Day Length Calculator
Estimate hours of daylight for any latitude and date using the Sun’s declination and hour angle.
How it works
declination δ ≈ 23.44° · sin(360° ÷ 365 · (N − 81)) · daylight hours = 24 · arccos(−tan(lat) · tan(δ)) ÷ π
Day length depends on how high the Sun climbs, which depends on your latitude and the Sun’s declination — its angle north or south of the equator on a given day of the year N. The half-day hour angle comes from arccos(−tan(latitude)·tan(declination)); double it and scale to hours. When that arccos argument leaves the valid range the location is in polar day or polar night, which the calculator reports. It ignores atmospheric refraction, the Sun’s disc size and elevation, so it runs a few minutes short of published sunrise-to-sunset times.
Worked example
At latitude 40°N on the June solstice, the declination is about +23.4°. The hour angle gives roughly 14.9 hours of daylight — the long day expected in the northern summer.
Sources: Sunrise equation — Wikipedia
Frequently asked questions
Why is my real day a bit longer than this?
Official sunrise and sunset are timed to the Sun’s upper edge and include atmospheric refraction, both of which extend daylight by several minutes. This geometric model uses the Sun’s centre at the true horizon, so it reads slightly short.
What do I enter for latitude?
Your latitude in degrees, positive for the northern hemisphere and negative for the southern. Longitude does not affect day length — only the clock time of sunrise and sunset, which this does not compute.
What happens near the poles?
Beyond the Arctic and Antarctic circles the Sun can stay up or down all day. When the formula’s arccos argument falls outside −1 to 1, the calculator reports 24 hours (polar day) or 0 hours (polar night).
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.