Sunrise Sunset Calculator

Calculate sunrise time, sunset time, solar noon, and day length for any location and date. The Sunrise Sunset Calculator uses latitude, longitude, and UTC offset.

882.2K usesUpdated · 2026-04-29Runs locally · zero upload

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.

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)
Symbol Meaning
φ Observer latitude (degrees)
λ Solar ecliptic longitude
ε Earth's obliquity (~23.44°)
EoT Equation of Time (minutes)
H Hour 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.

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.