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.

Decimal degrees (negative for south and west) or degrees, minutes and seconds, for example 33°55′29″S, 18°25′27″E.
Named zones follow the pinned IANA 2026e rules for 2020–2035, including daylight saving; fixed UTC offsets work for any year.

Showing the worked example. Results update as you type.

Result

Elevation (altitude)47.3618°47.3469° without refraction
Azimuth98.3069° (E)clockwise from true north
Zenith angle42.6382°
Declination23.4384°
Equation of time−1.795 minapparent minus mean solar time
Hour angle-46.9488°true solar time 08:52
Earth–Sun distance1.016267 au
Shadow length0.9208 × object height
  • 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

Related tools

Share this page

Remind me to visit Contifield

Adds a repeating reminder to your calendar, titled “Contifield Reminder: Visit www.contifield.com”.