A garden sundial in late afternoon with the Sun’s arc drawn across the skyTIME / PLACE / HORIZON

Sun position calculator

Altitude measures how high the Sun is above your geometric horizon. Azimuth measures its compass bearing clockwise from north: east is 90°, south 180° and west 270°.

Example · Greenwich · March equinox
Solar altitude38.5°
Compass bearing177.6°
Shadow length on level ground1.259 m
Shadow compass bearing357.6°

At 2026-03-20 12:00 UTC, the Sun is above the geometric horizon at 51.4779°, 0°.

What does the shadow measure?

For an upright of height h on horizontal ground, shadow length is h ÷ tan(altitude). Its bearing points 180° away from the Sun. Below the horizon there is no direct-Sun shadow; at the zenith the shadow contracts to zero and its direction becomes indeterminate.

When is the Sun highest?

The highest altitude occurs around local solar noon, which is not always 12:00 on a civil clock. Changing longitude shifts the Sun’s position at the same UTC instant; changing latitude changes the path’s height.

A negative altitude means the Sun’s centre is below the geometric horizon. Terrain and atmospheric refraction can change the visible sunrise or sunset.

Sun path and sun angle through the year

At local solar noon the Sun’s altitude is 90° minus the difference between your latitude and the Sun’s declination. The declination swings between +23.4° at the June solstice and −23.4° at the December solstice, so in London (51.5° north) noon altitude runs from about 15° in December to about 62° in June. At the equinoxes the declination is zero and noon altitude is 90° minus latitude: about 38.5° at London, as the default Greenwich example shows.

The sunrise and sunset bearings move with it. At the equinoxes the Sun rises due east and sets due west everywhere; at the June solstice it rises and sets well north of those points in the northern hemisphere, and south of them in the southern hemisphere. Entering a string of dates at one place shows the whole yearly sun path as a series of altitudes.

Using shadows to find direction and time

A shadow points away from the Sun, so the shortest shadow of the day points to true north in the northern hemisphere and to true south in the southern one, and it occurs at local solar noon. Compare two places on the same meridian on the same day and the difference between their noon altitudes is their difference in latitude, the measurement at the heart of the Eratosthenes experiment.

Use a UTC date and time, and add the longitude correction of four minutes per degree to turn it into local solar time. The result gives the solar altitude directly in degrees above the geometric horizon, without refraction, which lifts the Sun by about half a degree at the horizon.

Sunrise, sunset and solar noon are not on the clock

Sunrise and sunset occur when the Sun’s upper edge crosses the horizon, which with refraction is when its geometric centre is about 0.83° below it, so the calculator’s zero altitude is slightly before the visible sunrise. Local solar noon also drifts from clock noon through the year: the equation of time moves it by up to about sixteen minutes, earliest in early November and latest in mid-February, and the position within a time zone adds four minutes per degree of longitude.

For a precise sunrise or sunset, enter times around the expected moment and find where the altitude crosses −0.83°. For a shadow clock, the same tool gives the shadow direction at any time, so a stick in level ground can be checked against a printed table.

The same altitude drives practical choices. A fixed solar panel collects the most over a year when tilted at roughly its latitude and faced toward the equator, and the noon altitude on the shortest day tells you whether a south-facing window will see the Sun over a neighbouring roof. Enter the date of the shortest day and read the noon altitude: a neighbouring ridge that rises above that angle as seen from the window blocks the Sun at noon.