---
title: "SiderealTime"
language: "en"
type: "Symbol"
summary: "SiderealTime[] gives the right ascension of the local meridian for the current date and location. SiderealTime[date] gives the right ascension of the local meridian for the specified date. SiderealTime[loc] gives the right ascension of the local meridian for the specified location. SiderealTime[loc, date] gives the right ascension of the local meridian for the specified location and date. SiderealTime[{{loc1, date1}, {loc2, date2}, ...}] gives the right ascensions of the local meridians for all specified locations on the specified dates. SiderealTime[MeanTime, loc, date] gives the mean sidereal time for the specified location and date. SiderealTime[type, loc, date, func] uses func to determine what to return for extended locations."
keywords: 
- astronomical time
- stellar time
- telescope time
- sidereal day
- sidereal rotation period
canonical_url: "https://reference.wolfram.com/language/ref/SiderealTime.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Astronomical Computation & Data"
    link: "https://reference.wolfram.com/language/guide/AstronomicalComputationAndData.en.md"
  - 
    title: "Date & Time"
    link: "https://reference.wolfram.com/language/guide/DateAndTime.en.md"
related_functions: 
  - 
    title: "SolarTime"
    link: "https://reference.wolfram.com/language/ref/SolarTime.en.md"
  - 
    title: "Sunrise"
    link: "https://reference.wolfram.com/language/ref/Sunrise.en.md"
  - 
    title: "Sunset"
    link: "https://reference.wolfram.com/language/ref/Sunset.en.md"
  - 
    title: "SunPosition"
    link: "https://reference.wolfram.com/language/ref/SunPosition.en.md"
  - 
    title: "DaylightQ"
    link: "https://reference.wolfram.com/language/ref/DaylightQ.en.md"
  - 
    title: "JulianDate"
    link: "https://reference.wolfram.com/language/ref/JulianDate.en.md"
  - 
    title: "FromJulianDate"
    link: "https://reference.wolfram.com/language/ref/FromJulianDate.en.md"
  - 
    title: "StarData"
    link: "https://reference.wolfram.com/language/ref/StarData.en.md"
  - 
    title: "PlanetData"
    link: "https://reference.wolfram.com/language/ref/PlanetData.en.md"
  - 
    title: "MoonPosition"
    link: "https://reference.wolfram.com/language/ref/MoonPosition.en.md"
  - 
    title: "Longitude"
    link: "https://reference.wolfram.com/language/ref/Longitude.en.md"
---
# SiderealTime

SiderealTime[] gives the right ascension of the local meridian for the current date and location.

SiderealTime[date] gives the right ascension of the local meridian for the specified date.

SiderealTime[loc] gives the right ascension of the local meridian for the specified location.

SiderealTime[loc, date] gives the right ascension of the local meridian for the specified location and date.

SiderealTime[{{loc1, date1}, {loc2, date2}, …}] gives the right ascensions of the local meridians for all specified locations on the specified dates.

SiderealTime["MeanTime", loc, date] gives the mean sidereal time for the specified location and date.

SiderealTime[type, loc, date, func] uses func to determine what to return for extended locations.

## Details

* Sidereal time is typically used to locate celestial objects in the night sky and to decide when and where to point a telescope for optimal observation.

* ``SiderealTime`` returns a ``Quantity`` angle expressed in mixed units of hours, minutes and seconds of right ascension, as is traditionally done with angles measured along the celestial equator.

* ``SiderealTime[loc, date]``, equivalent to ``SiderealTime["ApparentTime", loc, date]``, computes the local apparent or true sidereal time, based on the apparent equator and equinox of date, hence including the effects of both precession and nutation.

* ``SiderealTime["MeanTime", loc, date]`` computes the local mean sidereal time based on the mean equator and equinox of date, including precession but averaging over nutation.

* ``SiderealTime[]`` makes use of ``\$GeoLocation`` and ``\$TimeZone`` to determine your location and time zone.

* Locations can be specified as ``GeoPosition`` objects, ``{lat, lon}`` pairs in degrees, ``Entity`` geo locations or ``GeoGraphics`` primitives.

* ``datespec`` can be a ``DateObject`` expression, a ``TimeObject`` expression, a date string or a ``{y, m, d, h, m, s}`` date list.

* ``datespec`` is assumed to be in ``\$TimeZone``, unless it is a ``DateObject`` or ``TimeObject`` expression with an explicit ``TimeZone`` option value.

* ``loc`` and ``date`` can be either individual items or lists of them.

* If ``datespec`` is a list of dates, then the results will contain ``TimeSeries`` objects.

* ``datespec`` can be specified as ``{start, end, increment}`` for compatibility with ``DateRange`` specifications.

* ``SiderealTime[…, func]`` is used to specify the format of output when extended locations are specified.

* Possible settings for ``func`` include:

|                   |                                                   |
| ----------------- | ------------------------------------------------- |
| Automatic         | returns intervals for extended locations only     |
| Interval          | returns intervals for all specified locations     |
| Mean              | returns mean value for extended locations         |
| Min               | returns minimum values for extended locations     |
| Max               | returns maximum values for extended locations     |
| StandardDeviation | returns standard deviation for extended locations |

## Examples (23)

### Basic Examples (7)

Compute the sidereal time for your current location:

```wl
In[1]:= SiderealTime[]

Out[1]= Quantity[MixedMagnitude[{21, 29, 10.5321}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Compute the sidereal time for a specified date:

```wl
In[1]:= SiderealTime[DateObject[{2024, 9, 25, 0, 58, 40.5585}, "Instant", "Gregorian", -5.]]

Out[1]= Quantity[MixedMagnitude[{0, 23, 55.2778}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Compute the sidereal time for a specified location:

```wl
In[1]:= SiderealTime[Entity["City", {"Chicago", "Illinois", "UnitedStates"}]]

Out[1]= Quantity[MixedMagnitude[{21, 31, 24.6032}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Compute the sidereal time for a specified latitude/longitude and date:

```wl
In[1]:= SiderealTime[GeoPosition[{50.3, -80.1}], DateObject[{2025, 3, 17, 15, 3, 6.49081}, "Instant", "Gregorian", -5.]]

Out[1]= Quantity[MixedMagnitude[{2, 25, 17.7664}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Compute the sidereal time for a specified city and date:

```wl
In[1]:= SiderealTime[\[FreeformPrompt]["Saint Louis"], DateObject[{2024, 8, 12, 9, 17, 16.2174}, "Instant", "Gregorian", -5.]]

Out[1]= Quantity[MixedMagnitude[{5, 42, 23.3035}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Compute the local mean sidereal time at your geo location for the given date:

```wl
In[1]:= SiderealTime["MeanTime", Here, DateObject[{2025, 3, 17, 16, 45, 0}, "Instant", "Gregorian", -5.]]

Out[1]= Quantity[MixedMagnitude[{3, 34, 54.3679}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

Compare this to the default apparent local sidereal time:

```wl
In[2]:= SiderealTime["ApparentTime", Here, DateObject[{2025, 3, 17, 16, 45, 0}, "Instant", "Gregorian", -5.]]

Out[2]= Quantity[MixedMagnitude[{3, 34, 54.4135}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

The difference is known as the equation of equinoxes:

```wl
In[3]:= % - %%

Out[3]= Quantity[MixedMagnitude[{0, 0, 0.0455746}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Find the mean sidereal time at multiple locations in Illinois for a given date and return their mean value:

```wl
In[1]:= SiderealTime["MeanTime", Entity["AdministrativeDivision", {"Illinois", "UnitedStates"}], DateObject[{2025, 3, 17, 16, 45, 0}], Mean]

Out[1]= Quantity[MixedMagnitude[{3, 29, 50.8176}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

### Scope (9)

#### Dates (3)

Dates can be specified as a ``DateObject`` :

```wl
In[1]:= SiderealTime[DateObject[{2023, 9, 13, 0, 0, 0.}, "Instant", "Gregorian", -6.]]

Out[1]= Quantity[MixedMagnitude[{23, 34, 56.7477}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Dates can be specified as a date string:

```wl
In[1]:= SiderealTime["September 23, 2024 12:00 AM CDT"]

Out[1]= Quantity[MixedMagnitude[{23, 17, 11.957}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Generate the sidereal time for a range of dates:

```wl
In[1]:= SiderealTime[DateRange[DateObject[{2023, 1, 1, 9, 0}, "Minute", "Gregorian", -6.], DateObject[{2023, 12, 31, 9, 0}, "Minute", "Gregorian", -6.], 10]]

Out[1]=
TemporalData[TimeSeries, 
 {{QuantityArray[StructuredArray`StructuredData[{37}, 
     {{15.85097563777504, 16.508089030751897, 17.16519741949791, 17.822295664818306, 
       18.479394669475834, 19.136500425109062, 19.79359375036486, 20.450678493363 ... poralData`DateSpecification[{2023, 1, 1, 10, 0, 0.}, {2023, 12, 27, 10, 0, 0.}, 
    {10, "Day"}]}, 1, {"Continuous", 1}, {"Discrete", 1}, 1, 
  {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, ValueDimensions -> 1}}, True, 
 13.3]
```

#### Locations (6)

Locations can be latitude/longitude pairs:

```wl
In[1]:= SiderealTime[GeoPosition[{40.1, -88.2}]]

Out[1]= Quantity[MixedMagnitude[{0, 20, 44.252}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Cities are treated as single, specific locations:

```wl
In[1]:= SiderealTime[Entity["City", {"SaintLouis", "Missouri", "UnitedStates"}]]

Out[1]= Quantity[MixedMagnitude[{0, 12, 33.6524}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Results for extended locations are intervals, by default:

```wl
In[1]:= SiderealTime[Entity["Country", "France"]]

Out[1]= Quantity[Interval[{MixedMagnitude[{5, 51, 21.5806}], MixedMagnitude[{6, 54, 46.9563}]}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

The form of the results for extended locations can be overridden:

```wl
In[1]:= SiderealTime[Entity["Country", "France"], Mean]

Out[1]= Quantity[MixedMagnitude[{6, 23, 4.39144}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

---

Generate the sidereal time for multiple locations:

```wl
In[1]:= SiderealTime[{Entity["City", {"Chicago", "Illinois", "UnitedStates"}], Entity["City", {"SaintLouis", "Missouri", "UnitedStates"}]}]

Out[1]= {Quantity[MixedMagnitude[{0, 22, 49.0984}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]], Quantity[MixedMagnitude[{0, 12, 34.0414}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]}
```

---

Find the sidereal time for multiple locations on different dates:

```wl
In[1]:= SiderealTime[{{Entity["City", {"Chicago", "Illinois", "UnitedStates"}], DateObject[{2025, 1, 1, 12}, TimeZone -> "America/Chicago"]}, {Entity["City", {"Moscow", "Moscow", "Russia"}], DateObject[{2023, 7, 28, 6}, TimeZone -> "Europe/Moscow"]}}]

Out[1]= {Quantity[18.930482339394775, "HoursOfRightAscension"], Quantity[1.8763135101775366, "HoursOfRightAscension"]}
```

### Applications (2)

Plot the equation of time by finding the difference between the Sun's right ascension at noon and the sidereal time at noon:

```wl
In[1]:= sunpos = SunPosition[GeoPosition[{0, 0}], DateRange[DateObject[{2021, 1, 1, 12, 0}, "Minute", "Gregorian", 0.], DateObject[{2021, 12, 31, 12, 0}, "Minute", "Gregorian", 0.], 10], CelestialSystem -> "Equatorial"];

In[2]:= stime = SiderealTime[GeoPosition[{0, 0}], DateRange[DateObject[{2021, 1, 1, 12, 0}, "Minute", "Gregorian", 0.], DateObject[{2021, 12, 31, 12, 0}, "Minute", "Gregorian", 0.], 10]];

In[3]:=
equationoftime = TimeSeriesThread[With[{diff = First[#][[1]] - Last[#]}, 
	UnitConvert[Mod[diff, Quantity[24, "HoursOfRightAscension"], Quantity[-12, "HoursOfRightAscension"]], "MinutesOfRightAscension"]]&, {sunpos, stime}];

In[4]:= DateListPlot[equationoftime, FrameLabel -> Automatic]

Out[4]= [image]
```

---

The difference between apparent and mean sidereal times is called the equation of the equinoxes:

```wl
In[1]:= SiderealTime["ApparentTime"] - SiderealTime["MeanTime"]

Out[1]= Quantity[MixedMagnitude[{0, 0, 0.0907835}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

Display the equation of the equinoxes over a year:

```wl
In[2]:=
dates = DateRange[DateObject[{2018, 1, 1, 0, 0, 0}], DateObject[{2018, 12, 31, 0, 0, 0}]];
trueST = SiderealTime[Here, #]& /@ dates;
meanST = SiderealTime["MeanTime", Here, #]& /@ dates;

In[3]:= ListPlot[UnitConvert[trueST - meanST, "ArcSeconds"]]

Out[3]= [image]
```

The same computation over 20 years, which shows the main nutation cycle of 18.6 years:

```wl
In[4]:=
dates = DateRange[DateObject[{2000, 1, 1, 0, 0, 0}], DateObject[{2020, 12, 31, 0, 0, 0}], "Week"];
trueST = SiderealTime[Here, #]& /@ dates;
meanST = SiderealTime["MeanTime", Here, #]& /@ dates;
ListPlot[UnitConvert[trueST - meanST, "ArcSeconds"]]

Out[4]= [image]
```

The primary period corresponds to an oscillation of 17.2 arc seconds of nutation in longitude:

```wl
In[5]:= MinMax[UnitConvert[trueST - meanST, "ArcSeconds"]]

Out[5]= {Quantity[-17.3510888095187, "Arcseconds"], Quantity[17.201299858061958, "Arcseconds"]}
```

### Properties & Relations (3)

The output of ``SiderealTime`` is an angle, not a time:

```wl
In[1]:= SiderealTime[]

Out[1]= Quantity[MixedMagnitude[{8, 9, 43.5369}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]

In[2]:= UnitDimensions[%]

Out[2]= {{"AngleUnit", 1}}

In[3]:= UnitConvert[%%, "AngularDegrees"]

Out[3]= Quantity[122.43140380393015, "AngularDegrees"]
```

---

``SiderealTime`` tracks Earth's rotation with respect to the fixed stars, with a full rotation taking one sidereal day:

```wl
In[1]:= With[{now = Now}, {SiderealTime[now], SiderealTime[now + Quantity[1, "SiderealDays"]]}]

Out[1]= {Quantity[MixedMagnitude[{8, 9, 43.7605}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]], Quantity[MixedMagnitude[{8, 9, 43.7595}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]}
```

---

Earth rotates with respect to the fixed stars in less than one day, and it needs to rotate a bit more to complete a full (solar) day:

```wl
In[1]:=
With[{now = Now}, 
	SiderealTime[now + Quantity[1, "Days"]] - SiderealTime[now]]

Out[1]= Quantity[MixedMagnitude[{0, 4, -3.44572}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

The effect accumulates during one year and hence Earth rotates 366.242 times with respect to the fixed stars in 365.242 days:

```wl
In[2]:= Quantity[360, "AngularDegrees"] / %

Out[2]= 365.244
```

Equivalently:

```wl
In[3]:= Quantity[1., "SolarYears"] / Quantity[1, "SolarDays"]

Out[3]= 365.242

In[4]:= Quantity[1., "SolarYears"] / Quantity[1, "SiderealDays"]

Out[4]= 366.242
```

### Possible Issues (1)

Although it looks like a time-based concept, ``SiderealTime`` is actually an angle:

```wl
In[1]:= SiderealTime[]//UnitDimensions

Out[1]= {{"AngleUnit", 1}}
```

### Neat Examples (1)

Choose a location and a date:

```wl
In[1]:=
loc = Here;
date = Now;
```

This is the sidereal time of that location at that time:

```wl
In[2]:= sidtime = SiderealTime[loc, date]

Out[2]= Quantity[MixedMagnitude[{0, 21, 0.537091}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]
```

Take the right ascensions of the Sun, the Moon and the planets:

```wl
In[3]:=
sunRA = First[SunPosition[date, CelestialSystem -> "Equatorial"]];
moonRA = First[MoonPosition[date, CelestialSystem -> "Equatorial"]];
planetsRA = EntityValue[{Entity["Planet", "Mercury"], Entity["Planet", "Venus"], Entity["Planet", "Mars"], Entity["Planet", "Jupiter"], Entity["Planet", "Saturn"], Entity["Planet", "Uranus"], Entity["Planet", "Neptune"]}, EntityProperty["Planet", "RightAscension", {"Date" -> date}]];
ascensions = Join[{sunRA, moonRA}, planetsRA]

Out[3]= {Quantity[1.5112225258471845, "HoursOfRightAscension"], Quantity[21.021096344541668, "HoursOfRightAscension"], Quantity[MixedMagnitude[{2, 39, 53.44}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]], Qua ... itude[{3, 0, 33.7}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]], Quantity[MixedMagnitude[{23, 47, 57.4}], MixedUnit[{"HoursOfRightAscension", "MinutesOfRightAscension", "SecondsOfRightAscension"}]]}
```

Construct text labels for them:

```wl
In[4]:=
symbols = {"☼", "☾", "☿", "♀", "♂", "♃", "♄", "♅", "♆"};
colors = {Yellow, White, Orange, Lighter[Blue], Red, Lighter[Purple], Orange, Cyan, Lighter[Blue]};
labels = MapThread[Text[Style[#1, #2, 17], {0, 3.4}.RotationMatrix[#3]]&, {symbols, colors, ascensions}];
```

Plot the directions of the Sun, the Moon and the planets as viewed from the South Pole, with respect to the fixed stars:

```wl
In[5]:=
GeoGraphics[{
	labels, 
	Thick, Black, Arrow[{{0, 0}, Here}], 
	GeoStyling[Opacity[.5]], NightHemisphere[date], 
	Thickness[.005], Opacity[.5], Line[Pi{{{-1, 0}, {1, 0}}, {{0, -1}, {0, 1}}}]
	}, 
	GeoRange -> "World", GeoProjection -> {"AzimuthalEquidistant", "Centering" -> {-90, Longitude[loc] - sidtime}}, GeoBackground -> GeoStyling["ReliefMap"], 
	Background -> Black, PlotRange -> 4, 
	PlotLabel -> sidtime, LabelStyle -> White
	]

Out[5]= [image]
```

## See Also

* [`SolarTime`](https://reference.wolfram.com/language/ref/SolarTime.en.md)
* [`Sunrise`](https://reference.wolfram.com/language/ref/Sunrise.en.md)
* [`Sunset`](https://reference.wolfram.com/language/ref/Sunset.en.md)
* [`SunPosition`](https://reference.wolfram.com/language/ref/SunPosition.en.md)
* [`DaylightQ`](https://reference.wolfram.com/language/ref/DaylightQ.en.md)
* [`JulianDate`](https://reference.wolfram.com/language/ref/JulianDate.en.md)
* [`FromJulianDate`](https://reference.wolfram.com/language/ref/FromJulianDate.en.md)
* [`StarData`](https://reference.wolfram.com/language/ref/StarData.en.md)
* [`PlanetData`](https://reference.wolfram.com/language/ref/PlanetData.en.md)
* [`MoonPosition`](https://reference.wolfram.com/language/ref/MoonPosition.en.md)
* [`Longitude`](https://reference.wolfram.com/language/ref/Longitude.en.md)

## Related Guides

* [Astronomical Computation & Data](https://reference.wolfram.com/language/guide/AstronomicalComputationAndData.en.md)
* [Date & Time](https://reference.wolfram.com/language/guide/DateAndTime.en.md)

## History

* [Introduced in 2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100.en.md) \| [Updated in 2021 (12.3)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn123.en.md)