Sunrise Sunset Calculator

Calculate sunrise sunset instantly in your browser — the published formula, worked locally with no data sent anywhere.

Loading calculator…

What this tool does

Calculate sunrise sunset instantly in your browser — the published formula, worked locally with no data sent anywhere. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.

How to use the Sunrise Sunset Calculator

  1. Enter or select date (yyyy-mm-dd).
  2. Enter or select latitude (degrees, negative = south).
  3. Enter or select longitude (degrees, negative = west).
  4. Enter or select your utc offset (hours, for local times).
  5. Read the calculated result; change any measurement to compare alternatives.

Formula

NOAA solar algorithm: from the day of year, compute the sun's mean longitude and anomaly, right ascension and declination, the equation of time, and the hour angle at zenith 90.833°; sunrise/sunset UTC = 720 − 4·(longitude ± hour angle) − equation of time (minutes).
date
Date (YYYY-MM-DD)
lat
Latitude (degrees, negative = south)
lon
Longitude (degrees, negative = west)
tz
Your UTC offset (hours, for local times)

The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.

Worked example

For sunrise sunset calculator, the following measurements illustrate the exact method: Date (YYYY-MM-DD): 2026-03-20; Latitude (degrees, negative = south): 40.7128; Longitude (degrees, negative = west): -74.006; Your UTC offset (hours, for local times): -4.

Inputs

  • Date (YYYY-MM-DD)2026-03-20
  • Latitude (degrees, negative = south)40.7128
  • Longitude (degrees, negative = west)-74.006
  • Your UTC offset (hours, for local times)-4

Result

  • Sunrise (UTC)11:00
  • Sunset (UTC)23:08
  • Sunrise (your offset)07:00
  • Sunset (your offset)19:08
  • Day length12 h 8 min
  • Day length (hours)12.13
  • Solar noon (UTC)17:04

Results explained

Sunrise (UTC)
Sunrise (UTC) from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.
Sunset (UTC)
Sunset (UTC) from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.
Sunrise (your offset)
Sunrise (your offset) from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.
Sunset (your offset)
Sunset (your offset) from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.
Day length
Day length from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.
Day length (hours)
Day length (hours) from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.
Solar noon (UTC)
Solar noon (UTC) from the formula above. The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.

Frequently asked questions

NOAA solar algorithm: from the day of year, compute the sun's mean longitude and anomaly, right ascension and declination, the equation of time, and the hour angle at zenith 90.833°; sunrise/sunset UTC = 720 − 4·(longitude ± hour angle) − equation of time (minutes).

The NOAA algorithm (accurate to about a minute within 1900–2100) uses the official sunrise zenith of 90.833°, which accounts for atmospheric refraction and the sun's disc. Times are for a level horizon at sea level; hills, buildings and elevation shift what you actually see.

Refraction lifts the sun's image by about 0.583° and the equation of time shifts solar noon away from clock noon, so even at the equator on the equinox sunrise falls a few minutes before 06:00 UTC at longitude 0.

Every field is labelled with its unit — enter values in exactly the labelled unit and read the result in the labelled output unit. Fields with a unit symbol also support the site-wide imperial/metric switch, which converts before the formula runs.

It uses double-precision arithmetic and the published constants and formulas named on this page. The last displayed digit may be rounded, and real conditions can differ from the idealized model described in the assumptions.

Yes. Every calculation runs entirely in your browser; nothing you enter is uploaded, stored or shared.