Sunrise & Sunset Calculator

Solar position algorithm — equinox-day-of-year + latitude → sunrise + sunset + solar noon. Within ±2 min of NOAA Sun Calculator for ±60° lat.

Inputs

New York City: 40.71; London: 51.51; Sydney: -33.87.

NYC: -74.01; London: -0.13; Sydney: 151.21.

Result

Sunrise / Sunset (local)
04:32:41 / 19:12:09
Solar noon 11:52:25 · day length 14h 39m. Declination 20.43°.
  • Date__TODAY__
  • Latitude40.7128°
  • Longitude-74.0060°
  • Day of year143
  • Solar declination20.43°
  • Equation of time3.60 min
  • Solar noon (UTC)16:52:25
  • Sunrise (UTC)09:32:41
  • Sunset (UTC)00:12:09
  • Local TZ offset-5 hr
  • Sunrise (local)04:32:41
  • Solar noon (local)11:52:25
  • Sunset (local)19:12:09
  • Day length14 hr 39 min

Step-by-step

  1. Day of year N = 143.
  2. Fractional year γ = 2π/365 · (143−1) = 2.4444 rad.
  3. Equation of time = 3.60 min; declination δ = 20.43°.
  4. Hour angle H = acos((cos 90.833° − sin φ · sin δ) / (cos φ · cos δ)).
  5. Solar noon = 12:00 UTC − 4·lon − EoT; sunrise/set = noon ∓ H · 4 minutes.

How to use this calculator

  • Enter your latitude (north positive) and longitude (east positive). Most map apps export decimal-degree coordinates directly.
  • Pick the date — defaults to today.
  • Enter your time zone offset from UTC — for US EST use -5, US PDT (with DST) use -7, UK BST use +1, India use +5.5.
  • Read sunrise / sunset / solar noon in both UTC and local time.

About this calculator

A simplified version of the NOAA solar-position algorithm — accurate to ±2 minutes between latitudes −60° and +60°, less accurate near the poles where refraction and rapid declination shifts dominate. The algorithm: (1) compute the day-of-year N; (2) compute solar declination and equation-of-time from N via Fourier series approximations; (3) compute the hour angle at sunrise/sunset using the 90.833° zenith angle (= 90° + 0.833° atmospheric refraction at the horizon); (4) convert hour angle to clock time. The 90.833° zenith accounts for the sun's ~0.27° apparent radius plus ~0.567° standard atmospheric refraction. At polar latitudes, the sun may not rise or set on a given date (polar night/day) — those cases are flagged. For higher precision (±10 sec), use the full NOAA SPA (Solar Position Algorithm, Reda & Andreas 2004) or the U.S. Naval Observatory Astronomical Almanac formulas.

Frequently asked

Sunrise is when the sun's upper limb touches the horizon (zenith 90.833°). Civil twilight begins when the sun is 6° below the horizon (~30 min before sunrise mid-latitudes); nautical at 12°; astronomical at 18°. This calculator computes the geometric sunrise / sunset only.

Related calculators

More tools you might like