Where Is the Sun? Elevation, Azimuth and Day Length Explained
How the sun's elevation, azimuth, declination and equation of time are calculated with the NOAA algorithm, plus sunrise, day length and FAO-56 radiation.

Where Is the Sun? Elevation, Azimuth and Day Length Explained
Solar engineers need it to orient panels, architects to plan shading, farmers to estimate crop water use and photographers to plan a shot. The sun's position in the sky can be calculated precisely for any place and moment. This guide explains the main quantities and how to use them with the solar position calculator.
The sun's coordinates
Two angles describe where the sun is:
- Elevation (altitude): the angle above the horizon, from 0° at sunrise to the maximum at solar noon.
- Azimuth: the compass direction, measured clockwise from north: 90° east, 180° south, 270° west.
Declination
As Earth orbits the sun with its axis tilted by about 23.44°, the sun appears to move north and south. Its declination ranges from +23.44° at the June solstice to −23.44° at the December solstice and is zero at the equinoxes. Textbooks often use Cooper's 1969 formula, δ = 23.45° sin(360 (284 + n)/365); the NOAA algorithm used here is more accurate.
The equation of time
Clock time assumes the sun moves uniformly, but Earth's elliptical orbit and axial tilt make the real sun run up to 16 minutes ahead or 14 minutes behind. This difference, the equation of time, shifts solar noon during the year.
Hour angle and elevation
The hour angle is how far the sun is from the local meridian, 15° per hour. Combining it with latitude and declination gives the elevation:
sin(h) = sin(φ) sin(δ) + cos(φ) cos(δ) cos(H).
Near the horizon, atmospheric refraction lifts the sun's image by about half a degree, which the calculator includes.
Sunrise and sunset
Sunrise and sunset are defined when the sun's upper edge touches the horizon. Because of refraction and the sun's radius, that is when the centre is 0.833° below the horizon. Between those times lies the day length. Above the Arctic Circle in summer the sun never sets (polar day); in winter it never rises (polar night).
Extraterrestrial radiation
The FAO's guide for crop evapotranspiration (Paper 56) calculates daily extraterrestrial radiation Ra from latitude, declination and the Earth-sun distance. Ra is the energy reaching the top of the atmosphere. On clear days roughly 75 percent of Ra reaches the ground at sea level. Ra peaks near 41 to 42 MJ/m² per day at mid-latitudes in midsummer.
The NOAA algorithm
The calculator follows the spreadsheet algorithm of the NOAA Global Monitoring Laboratory, based on Jean Meeus's Astronomical Algorithms. It is accurate to about one minute for sunrise and sunset at latitudes below 72°.
Using the calculator
- Enter the date.
- Enter the local clock time.
- Enter the time zone offset from UTC, including summer time.
- Enter latitude (north positive) and longitude (east positive).
- Read the position, the sun times, the hourly table and Ra.
Example
London (51.5° N, 0° E) on 21 June 2026, with British Summer Time (+1):
- sunrise 04:43, solar noon 13:02, sunset 21:21,
- day length 16 h 38 min,
- maximum elevation about 62°,
- declination 23.44°,
- Ra 41.7 MJ/m² per day.
Practical tips
- For fixed solar panels, a tilt close to the latitude facing the equator maximises yearly output.
- Use the hourly azimuth and elevation to check whether a tree or building will shade a window or panel.
- For photography, the hour after sunrise and before sunset gives low, warm light.
Limits
Local hills, buildings and elevation change the visible sunrise. The calculator is accurate for planning, not for navigation.


