geoprimsField-grade geospatial math

Sun position (azimuth and elevation)

The sun's azimuth, elevation, declination, and hour angle for a place and time by the NREL Solar Position Algorithm, with the result as a cross-check, shadow length, and incidence on a slope.

A published result changed on 2026-09-19: Sun position is now stable, so its results no longer carry the EXPERIMENTAL_TOOL warning. Changelog

A published result changed on 2026-09-18: Sun position uses the NREL Solar Position Algorithm (±0.0003°) instead of the NOAA equations (about ±0.01°). Changelog

69.1167°

The sun is 69.1167° up, at azimuth 136.6968°.

Azimuth
Zenith angle
Geometric elevation
Declination
Equation of time
Hour angle
Provenance
Computed by
time.sun.position 1.0.0, core 0.1.0
Model
NREL Solar Position Algorithm (topocentric, with refraction from pressure and temperature); ΔT from Espenak and Meeus unless given; NOAA equations as a cross-check
Accuracy
±0.0003° (SPA, −2000 to 6000) with UT1; taking UT1 as UTC adds up to about 0.004° of azimuth
Notes
None
Cites
Reda, I., and Andreas, A., National Renewable Energy Laboratory, Solar Position Algorithm for Solar Radiation Applications (NREL/TP-560-34302); pvlib python Development Team, pvlib.solarposition.spa_python; Espenak, F., and Meeus, J., NASA Goddard Space Flight Center, Polynomial Expressions for Delta T; NOAA Global Monitoring Laboratory, NOAA Solar Calculator: General Solar Position Calculations

Something look off?

Your values

Showing an example. Change anything.
More options 9
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: NREL Solar Position Algorithm (topocentric, with refraction from pressure and temperature); ΔT from Espenak and Meeus unless given; NOAA equations as a cross-check

Accuracy: ±0.0003° (SPA, −2000 to 6000) with UT1; taking UT1 as UTC adds up to about 0.004° of azimuth

When to use this: Use this when you need where the sun is at a moment: the azimuth and elevation for shadow studies, solar panel aiming, camera and survey planning, glare and hotspot checks, or the incidence angle on a sloping surface. It also gives the shadow an object of a given height casts, with its direction.

Limitations: Refraction near the horizon depends on the pressure and temperature you give it, and a low sun is where that matters most. Taking UT1 as UTC costs up to about four thousandths of a degree of azimuth, which is only a concern for survey work, where DUT1 from IERS belongs in the input. It is the sun's geometry, not the weather: cloud, haze, and terrain are yours to account for.

Worked example: Denver at 12:00 MDT on the June solstice. Source: NREL SPA.

You enter

Latitude
39.7392 deg
Longitude
-104.9903 deg
Object height
10 m
Time
2026-06-21T12:00-06:00

You get

Elevation
69.1167°
Azimuth
136.6968°
Zenith angle
20.8833°
Geometric elevation
69.1103°
Declination
23.4367°
Equation of time
-1.87 min
Hour angle
-15.4589°
ΔT used
75.4 s
NOAA cross-check elevation
69.12°
NOAA cross-check azimuth
136.69°
Shadow length
3.82 m
Shadow direction
316.7°
Scene duration
86,400 s
Original time of day
64,800 s
Scene time
64,800 s
UTC at playhead
2026-06-21T18:00:00Z
Subsolar latitude
23.4376°
Subsolar longitude
-89.5303°

Review: Not yet independently reviewed by a geodesist.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 28 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Constants this tool assumes

Values you do not enter, and where each comes from.

Default observer elevation
0 m — pvlib solar-position API documentation
Default annual average air pressure
1013.25 hPa — pvlib solar-position API documentation
Default annual average air temperature
12 degC — pvlib solar-position API documentation
Typical atmospheric refraction at sunrise and sunset
0.5667 deg — NREL Solar Position Algorithm

Sources

Terms

DUT1: UT1 minus UTC
The difference between Earth-rotation time and UTC, always under 0.9 s, broadcast so users can recover UT1. Source: IERS Bulletin C (leap seconds)
IERS: International Earth Rotation and Reference Systems Service
The service that maintains the ITRF and Earth orientation data, and announces leap seconds in Bulletin C. Source: IERS Bulletin C (leap seconds)
NOAA: National Oceanic and Atmospheric Administration
The US agency that includes the National Geodetic Survey and the National Weather Service. Source: NOAA Solar Calculator
TT: Terrestrial Time
The uniform time scale of astronomical ephemerides: TAI plus 32.184 seconds. Source: Espenak and Meeus Delta T polynomials
UT1: Universal Time 1
Time kept by Earth's actual rotation. It drifts against atomic time, and UTC is kept within 0.9 s of it. Source: IERS Bulletin C (leap seconds)
UTC: Coordinated Universal Time
The world's civil time standard, kept within 0.9 s of Earth's rotation by leap seconds. Aviation calls it Zulu time, written with a Z. Source: IERS Bulletin C (leap seconds)

NOAA — National Oceanic and Atmospheric Administration

The US agency that includes the National Geodetic Survey and the National Weather Service.

Source: NOAA Solar Calculator