Daylight Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Day length depends on the latitude and the Sun's declination on that date. Enter the latitude (negative south of the equator) and pick a date.
Result
Length of daylight
Fractional year (radians)
- Solar declination (degrees)
- Cosine of the sunrise hour angle
- Daylight (decimal hours)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Latitude (negative = south), in °: enter a number from -90 to 90.
- Date: pick a date.
- Read the result: Length of daylight; the panel also shows Fractional year (radians), Solar declination (degrees), Cosine of the sunrise hour angle and Daylight (decimal hours).
How this calculator works
From NOAA Global Monitoring Laboratory, General Solar Position Calculations (gml.noaa.gov/grad/solcalc/solareqns.PDF, read 2026-10-27): fractional year γ = 2π ÷ (days in the year) × (day of year − 1) at noon; declination δ = 0.006918 − 0.399912 cos γ + 0.070257 sin γ − 0.006758 cos 2γ + 0.000907 sin 2γ − 0.002697 cos 3γ + 0.00148 sin 3γ (radians).
Sunrise hour angle: cos ha = cos 90.833° ÷ (cos φ cos δ) − tan φ tan δ, where 90.833° allows for refraction and the Sun's disk. Daylight = 2 ha ÷ 15° per hour. When the value is beyond ±1 the Sun does not set (24 h) or does not rise (0 h).
Worked example
| Latitude (negative = south) | 40.7 ° |
|---|---|
| Date | 2026-06-21 |
| Length of daylight | 15 h 06 min |
|---|---|
| Daylight (decimal hours) | 15.09 |
| Solar declination (degrees) | 23.452 |
Frequently asked questions
Why is daylight a bit over 12 hours at the equinox?
Sunrise and sunset are counted at the Sun's upper edge, and refraction lifts it, which together add a few minutes.
What do the fractional year and declination lines show?
The intermediate steps of NOAA's method: the position in the year and the Sun's angle north or south of the equator.