Astronomy and time
Sun position calculator: elevation and azimuth
Solar elevation, azimuth, zenith angle, declination, hour angle and equation of time for any place and time, with atmospheric refraction, by the NOAA method.
Runs in your browser. What you enter stays on this page and is not uploaded.
Showing the worked example. Results update as you type.
Result
- Instant used: 2010-06-21T15:54:00Z (2010-06-21 09:54:00 UTC−06:00).
Method and limits
From the instant, the Sun’s declination δ and the equation of time E are computed (Meeus’s low-precision solar coordinates, as in NOAA’s calculator). True solar time is the UTC time of day + E + 4λ minutes, and the hour angle H is that time ÷ 4 − 180°. Then
cos θz = sin φ sin δ + cos φ cos δ cos H gives the zenith angle, the elevation is 90° − θz, and the azimuth (clockwise from true north) is found from cos A′ = (sin φ cos θz − sin δ) / (cos φ sin θz).
NOAA’s refraction correction is added to the elevation: for elevations above 5°, (58.1/tan h − 0.07/tan³ h + 0.000086/tan⁵ h)″; between −0.575° and 5°, (1735 − 518.2h + 103.4h² − 12.79h³ + 0.711h⁴)″; below, −20.774″/tan h.
Worked examples: at 40°N, 105°W on 21 June 2010 at 09:54 in UTC−6, the NOAA spreadsheet gives elevation 47.36178° (47.34693° without refraction) and azimuth 98.30692°, which this page reproduces to the last digit shown. For NREL’s Solar Position Algorithm test case (39.742476°N, 105.1786°W, 17 October 2003, 12:30:30 UTC−7) it gives zenith 50.109° and azimuth 194.343°, within 0.003° of NREL’s 50.11162° and 194.34024°.
Limits
Accuracy is about 0.01° for 1800–2100. Refraction assumes standard pressure and temperature and is uncertain near the horizon. Positions are geocentric to within the Sun’s parallax (under 0.003°). The page opens on the current time and your device’s time zone.
References
- NOAA Global Monitoring Laboratory: Solar Calculator
- NOAA GML: solar calculation details (method, refraction, accuracy)
- Meeus, J. (1998). Astronomical Algorithms, 2nd ed. Willmann-Bell (chapters 7, 12, 22, 25, 28)
- pysunnoaa: port of the NOAA spreadsheet with worked outputs
- Reda, I. & Andreas, A. (2004). Solar Position Algorithm for Solar Radiation Applications. NREL/TP-560-34302
Related tools
- Sunrise, sunset, solar noon and twilight calculatorSunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight for any coordinates and date, in local time, by the NOAA method.
- Moon phase and illumination calculatorMoon phase, illuminated fraction, age and distance for any date and time, with the next new moon, first quarter, full moon and last quarter in local time.
- Julian date, MJD, GPS week, Unix time and sidereal time converterConvert between UTC, Julian Date, Modified Julian Date, Unix time and GPS week and seconds, with leap seconds, TT and Greenwich sidereal time.