Sunrise Sunset Calculator

Calculate sunrise, sunset, solar noon, day length, golden hour, blue hour, and civil/nautical/astronomical twilight for any location and date.

882.2K uses Updated · 2026-05-11 Runs locally · zero upload
AD

How to Use Sunrise Sunset Calculator

The Sunrise Sunset Calculator delivers instant solar times for any location on Earth.

  1. Choose a Location Preset — Select a city from the preset list; the Sunrise Sunset Calculator fills in latitude, longitude, and UTC offset automatically.
  2. Enter Custom Coordinates — For unlisted locations, type latitude (−90 to 90) and longitude (−180 to 180) directly and choose the matching UTC offset.
  3. Pick a Date — Use the date picker or click the Previous/Next buttons to step through days; the Sunrise Sunset Calculator updates all results instantly.

The Sunrise Sunset Calculator outputs sunrise time, solar noon, sunset time, day length, and night length in local time based on the UTC offset provided. Click Show Golden Hour & Twilight to also view golden hour windows, blue hour windows, and civil, nautical, and astronomical twilight times.

Formula & Theory — Sunrise Sunset Calculator

The Sunrise Sunset Calculator implements a simplified NOAA solar geometry algorithm:

Solar Declination: δ = arcsin(sin(ε) · sin(λ))
Hour Angle:        H = arccos((cos(90.833°) − sin(φ)·sin(δ)) / (cos(φ)·cos(δ)))
Solar Noon:        t_noon = (720 − 4·lon − EoT + UTC_offset) / 60
Sunrise:           t_rise = t_noon − H/15
Sunset:            t_set  = t_noon + H/15
Day Length:        D = 2·H/15  (hours)
SymbolMeaning
φObserver latitude (degrees)
λSolar ecliptic longitude
εEarth’s obliquity (~23.44°)
EoTEquation of Time (minutes)
HHour angle at sunrise/sunset

The 90.833° zenith accounts for atmospheric refraction and the sun’s apparent diameter, giving the Sunrise Sunset Calculator realistic civil sunrise/sunset times.

For the advanced twilight times, the Sunrise Sunset Calculator computes the hour angle at each altitude threshold:

EventSun AltitudeZenith Angle
Standard Sunrise/Sunset−0.833°90.833°
Golden Hour end/start+6°84°
Blue Hour boundary−4°94°
Civil Twilight−6°96°
Nautical Twilight−12°102°
Astronomical Twilight−18°108°

Golden Hour is when the sun is between 0° and 6° above the horizon — the warm, soft light favored by photographers. Blue Hour is when the sun is between −4° and −6°, producing deep blue tones before sunrise and after sunset. Civil, nautical, and astronomical twilight define progressively darker stages of dawn and dusk.

Polar Conditions

When cos(H) < −1, the sun never dips below the horizon (midnight sun). When cos(H) > 1, the sun never rises (polar night). The Sunrise Sunset Calculator identifies both conditions automatically.

Use Cases for Sunrise Sunset Calculator

The Sunrise Sunset Calculator is useful across many disciplines and hobbies:

  • Travel Planning — Look up sunrise and sunset times at your destination before arriving, so you can schedule sightseeing around the best natural light.
  • Photography Golden Hour — Photographers rely on the Sunrise Sunset Calculator to plan shoots during the golden hour just after sunrise or just before sunset for warm, directional light.
  • Outdoor Activities — Hikers, runners, and cyclists use the Sunrise Sunset Calculator to ensure they finish their routes before darkness falls.
  • Agriculture and Gardening — Farmers and gardeners track day length across seasons to time planting, harvesting, and greenhouse supplemental lighting.
  • Religious Observance — Many religious practices (fasting, prayer times, Shabbat) are tied to sunrise and sunset; the Sunrise Sunset Calculator provides precise local times.
  • Education and Geography — Students use the Sunrise Sunset Calculator to observe how day length changes with latitude and season, illustrating Earth’s axial tilt and orbital mechanics.
  • Energy Management — Solar panel operators use the Sunrise Sunset Calculator to predict peak generation hours and schedule battery storage accordingly.

Frequently asked questions about Sunrise Sunset Calculator

How accurate is the Sunrise Sunset Calculator?

The Sunrise Sunset Calculator uses a simplified NOAA solar position algorithm accurate to within 1–2 minutes for most mid-latitude locations. High-latitude and polar regions may see larger deviations.

Does the Sunrise Sunset Calculator account for Daylight Saving Time?

The Sunrise Sunset Calculator uses the UTC offset you select. If your location observes DST, manually set the offset to the active DST value (e.g. UTC+2 instead of UTC+1 for Central Europe in summer).

What is solar noon in the Sunrise Sunset Calculator?

Solar noon is the moment when the sun reaches its highest point in the sky. The Sunrise Sunset Calculator computes solar noon based on the equation of time and your longitude.

What are midnight sun and polar night in the Sunrise Sunset Calculator?

Above the Arctic or Antarctic Circle on certain dates, the sun never sets (midnight sun) or never rises (polar night). The Sunrise Sunset Calculator detects these conditions and displays a special message.

Is my data stored?

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