Daylight Calculator
Calculate sunrise, sunset, twilight times and daylight duration for any location and date using astronomical algorithms.
About
Accurate daylight calculations require solving the spherical trigonometry of Earth's rotation relative to the Sun. This calculator implements the standard astronomical algorithms from Jean Meeus' Astronomical Algorithms, computing the Sun's declination via the obliquity of the ecliptic (ε ≈ 23.44°) and applying the hour angle formula to derive sunrise and sunset times. Civil twilight begins when the Sun's geometric center is 6° below the horizon; nautical twilight at 12°; astronomical twilight at 18°. Polar regions experience perpetual daylight or darkness when the Sun's declination exceeds the complementary latitude.
The Equation of Time correction accounts for Earth's elliptical orbit and axial tilt, causing solar noon to drift by up to ±16 minutes from mean noon throughout the year. This tool calculates true solar time, not civil time approximations. Atmospheric refraction (0.833°) is applied to sunrise/sunset, meaning the Sun is geometrically below the horizon when visually touching it.
Formulas
The hour angle H at sunrise/sunset is derived from the solar zenith angle equation. For a horizon angle of 90.833° (including refraction and solar disk radius):
Where z = 90.833° is the zenith angle, φ is the observer's latitude, and δ is the Sun's declination. The declination is computed from:
Where N is the day of the year. Sunrise time trise and sunset time tset are computed as:
Where E is the Equation of Time (minutes), λ is longitude, and TZ is the timezone offset in hours. The Equation of Time corrects for orbital eccentricity:
Where B = 360°365 ⋅ (N − 81). For twilight calculations, replace the zenith angle: Civil twilight uses z = 96°, Nautical uses z = 102°, and Astronomical uses z = 108°.
Reference Data
| Location | Latitude | Longest Day | Shortest Day | Variation |
|---|---|---|---|---|
| Equator | 0° | 12h 7m | 12h 7m | 0m |
| Miami, USA | 25.76°N | 13h 45m | 10h 32m | 3h 13m |
| Cairo, Egypt | 30.04°N | 14h 4m | 10h 5m | 3h 59m |
| Tokyo, Japan | 35.68°N | 14h 35m | 9h 45m | 4h 50m |
| Rome, Italy | 41.90°N | 15h 14m | 9h 7m | 6h 7m |
| New York, USA | 40.71°N | 15h 6m | 9h 15m | 5h 51m |
| Paris, France | 48.86°N | 16h 10m | 8h 14m | 7h 56m |
| London, UK | 51.51°N | 16h 38m | 7h 50m | 8h 48m |
| Berlin, Germany | 52.52°N | 16h 49m | 7h 40m | 9h 9m |
| Moscow, Russia | 55.76°N | 17h 34m | 7h 0m | 10h 34m |
| Stockholm, Sweden | 59.33°N | 18h 37m | 6h 5m | 12h 32m |
| Helsinki, Finland | 60.17°N | 18h 57m | 5h 49m | 13h 8m |
| Reykjavik, Iceland | 64.15°N | 21h 5m | 4h 7m | 16h 58m |
| Tromsø, Norway | 69.65°N | 24h 0m | 0h 0m | Polar Day/Night |
| North Cape | 71.17°N | 24h 0m | 0h 0m | Polar Day/Night |
| Sydney, Australia | 33.87°S | 14h 24m | 9h 54m | 4h 30m |
| Cape Town, SA | 33.93°S | 14h 25m | 9h 53m | 4h 32m |
| Buenos Aires | 34.60°S | 14h 30m | 9h 48m | 4h 42m |
| Ushuaia, Argentina | 54.80°S | 17h 18m | 7h 12m | 10h 6m |
| McMurdo Station | 77.85°S | 24h 0m | 0h 0m | Polar Day/Night |