How to Use Day & Night Length Calculator
The Day & Night Length Calculator computes how long the Sun stays above the horizon at any place and date.
- Pick a date.
- Enter latitude and longitude — Both in degrees.
- Enter the time-zone offset — Hours from UTC; positive east, negative west.
- Read the results — Daylight length, night length, approximate sunrise and sunset.
Formula & Theory — Day & Night Length Calculator
The Day & Night Length Calculator uses the standard astronomical approximation:
N = day of year
δ = 23.44° · sin(360°·(284 + N) / 365)
cos(H) = −tan(latitude)·tan(δ)
day_length_hours = 2·H / 15
sunrise = noonUTC − day_length / 2 (then add tz offset)
| Symbol | Meaning |
|---|---|
| N | Day of year (1–365) |
| δ | Solar declination |
| H | Half day length in degrees |
| latitude | Observer latitude |
Assumptions and Limits
The Day & Night Length Calculator ignores atmospheric refraction (≈0.57°), observer elevation, and the Sun’s finite disk. Real sunrise/sunset can differ by a few minutes. For very precise times, use an ephemeris-based service.
Use Cases for Day & Night Length Calculator
- Travel — Plan day-trips and photo opportunities.
- Solar power — Estimate available daylight for off-grid systems.
- Gardening — Track growing day-length for seasonal crops.
- Education — Demonstrate why summers near the poles never get dark.
The Day & Night Length Calculator offers a fast, offline answer for any place and date.