Sun Altitude Calculator
Estimate the Sun’s altitude above the horizon for a given latitude, day of year and solar time.
How it works
δ = 23.44°·sin(360/365·(N−81)) · H = 15·(t−12) · altitude = asin( sin φ·sin δ + cos φ·cos δ·cos H )
The Sun’s altitude is its angle above the horizon. It depends on your latitude, the solar declination (which swings between ±23.44° over the year), and the hour angle set by solar time. This uses a simplified declination model accurate to about half a degree — fine for shadow and daylight estimates, not for precise astronomy.
Worked example
At 40.71°N on the June solstice (day 172) at solar noon: δ ≈ 23.4°, H = 0°, so altitude = asin(sin 40.71°·sin 23.4° + cos 40.71°·cos 23.4°) ≈ 72.7° — the Sun’s highest point of the year there.
Sources: Solar zenith angle — Wikipedia
Frequently asked questions
What is solar time?
Solar time is local time set by the Sun, with noon when the Sun crosses the meridian. It can differ from clock time by up to about an hour depending on your longitude within the time zone and daylight saving.
What does a negative altitude mean?
A negative altitude means the Sun is below the horizon — it is night or twilight at that time and place.
How accurate is this?
The declination model is approximate (±0.5°) and ignores atmospheric refraction and the equation of time, so treat results as estimates for planning shadows, solar panels or golden hour.
Related calculators
Educational estimate. Uses a spherical-Earth model; results differ slightly from ellipsoidal (WGS84) calculations.