# Position of the Sun

The Sun as seen from Lamlash, Scotland (55° 31′ 47.43″ N, 5° 05′ 59.77″ W) on 3 January 2010, at 8:53 a.m. local time

The position of the Sun in the sky is a function of both the time and the geographic location of observation on Earth's surface. As Earth orbits the Sun over the course of a year, the Sun appears to move with respect to the fixed stars on the celestial sphere, along a circular path called the ecliptic.

Earth's rotation about its axis causes the fixed stars to apparently move across the sky in a way that depends on the observer's geographic latitude. The time when a given fixed star transits the observer's meridian depends on the geographic longitude.

To find the Sun's position for a given location at a given time, one may therefore proceed in three steps as follows:[1][2]

1. calculate the Sun's position in the ecliptic coordinate system,
2. convert to the equatorial coordinate system, and
3. convert to the horizontal coordinate system, for the observer's local time and location.

This calculation is useful in astronomy, navigation, surveying, meteorology, climatology, solar energy, and sundial design.

## Approximate position

### Ecliptic coordinates

These equations, from the Astronomical Almanac,[3][4] can be used to calculate the apparent coordinates of the Sun, mean equinox and ecliptic of date, to a precision of about 0°.01 (36″), for dates between 1950 and 2050.

Start by calculating n, the number of days (positive or negative) since Greenwich noon, Terrestrial Time, on 1 January 2000 (J2000.0). If you know the Julian date for your desired time then

${\displaystyle n=\mathrm {JD} -2451545.0}$

The mean longitude of the Sun, corrected for the aberration of light, is:

${\displaystyle L=280.460^{\circ }+0.9856474^{\circ }n}$

The mean anomaly of the Sun (actually, of the Earth in its orbit around the Sun, but it is convenient to pretend the Sun orbits the Earth), is:

${\displaystyle g=357.528^{\circ }+0.9856003^{\circ }n}$

Put ${\displaystyle L}$ and ${\displaystyle g}$ in the range 0° to 360° by adding or subtracting multiples of 360° as needed.

Finally, the ecliptic longitude of the Sun is:

${\displaystyle \lambda =L+1.915^{\circ }\sin g+0.020^{\circ }\sin 2g}$

The ecliptic latitude of the Sun is nearly:

${\displaystyle \beta =0}$,

as the ecliptic latitude of the Sun never exceeds 0.00033°,[5]

and the distance of the Sun from the Earth, in astronomical units, is:

${\displaystyle R=1.00014-0.01671\cos g-0.00014\cos 2g}$.

### Equatorial coordinates

${\displaystyle \lambda }$, ${\displaystyle \beta }$ and ${\displaystyle R}$ form a complete position of the Sun in the ecliptic coordinate system. This can be converted to the equatorial coordinate system by calculating the obliquity of the ecliptic, ${\displaystyle \epsilon }$, and continuing:

${\displaystyle \alpha =\arctan(\cos \epsilon \tan \lambda )}$, where ${\displaystyle \alpha }$ is in the same quadrant as ${\displaystyle \lambda }$,

To get RA at the right quadrant on computer programs use double argument Arctan function such as ATAN2(y,x)

${\displaystyle \alpha =\arctan 2(\cos \epsilon \sin \lambda ,\cos \lambda )}$

and declination,

${\displaystyle \delta =\arcsin(\sin \epsilon \sin \lambda )}$.

### Rectangular equatorial coordinates

In right-handed rectangular equatorial coordinates (where the ${\displaystyle X}$ axis is in the direction of the vernal point, and the ${\displaystyle Y}$ axis is 90° to the east, in the plane of the celestial equator, and the ${\displaystyle Z}$ axis is directed toward the north celestial pole[6] ), in astronomical units:

${\displaystyle X=R\cos \epsilon \cos \lambda }$
${\displaystyle Y=R\cos \epsilon \sin \lambda }$
${\displaystyle Z=R\sin \epsilon }$

### Obliquity of the ecliptic

Where the obliquity of the ecliptic is not obtained elsewhere, it can be approximated:

${\displaystyle \epsilon =23.439^{\circ }-0.0000004^{\circ }n}$

for use with the above equations.

Other Languages
العربية: موقع الشمس
slovenščina: Navidezna lega Sonca