Day & Night Length Calculator

Free Day & Night Length Calculator — work out daylight hours, sunrise and sunset for any date, latitude, longitude and time-zone offset.

981.7K uses Updated · 2026-05-12 Runs locally · zero upload
AD

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.

  1. Pick a date.
  2. Enter latitude and longitude — Both in degrees.
  3. Enter the time-zone offset — Hours from UTC; positive east, negative west.
  4. 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)
SymbolMeaning
NDay of year (1–365)
δSolar declination
HHalf day length in degrees
latitudeObserver 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.

Frequently asked questions about Day & Night Length Calculator

How accurate is the Day & Night Length Calculator?

The Day & Night Length Calculator uses the standard astronomical approximation. Daylight length is usually within a few minutes of detailed almanac data; sunrise/sunset clock times are estimates because atmospheric refraction and elevation are not included.

When should I use a Day & Night Length Calculator?

Use the Day & Night Length Calculator for travel planning, outdoor photography, gardening, fishing, and educational demos of polar day and polar night.

Does it handle polar regions?

Yes. The Day & Night Length Calculator detects the midnight-sun and polar-night conditions and reports them directly.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.