Skip to content
FiftyCalc Free calculators for all 50 states

Sunrise Sunset Calculator

Test cases replayed : 4 of 4 match · Methodology · No outside source listed

Enter a date, your latitude and longitude and your clock's UTC offset to get sunrise, sunset, solar noon and the length of the day.

Result

Sample figures

Sunrise—

Day of the year —

  • Fractional year γ (rad)—
  • Equation of time (minutes)—
  • Solar declination (degrees)—
  • Sunrise hour angle (degrees)—
  • Sunset—
  • Solar noon—
  • Day length—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Sunrise Sunset Calculator

Date: pick a date.

Latitude (+ north, − south), in °: enter a number from -90 to 90. Prefilled example: 40.7128.

Longitude (+ east, − west), in °: enter a number from -180 to 180. Prefilled example: -74.006.

UTC offset of your clock (e.g. −5 EST, −4 EDT), in hours: enter a number from -12 to 14. Prefilled example: -4.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Date: pick a date.
  2. Latitude (+ north, − south), in °: enter a number from -90 to 90.
  3. Longitude (+ east, − west), in °: enter a number from -180 to 180.
  4. UTC offset of your clock (e.g. −5 EST, −4 EDT), in hours: enter a number from -12 to 14.
  5. Read the result: Sunrise; the panel also shows Day of the year, Fractional year γ (rad), Equation of time (minutes), Solar declination (degrees), Sunrise hour angle (degrees), Sunset, Solar noon and Day length.

How this calculator works

The method is NOAA's General Solar Position Calculations (NOAA Global Monitoring Laboratory, gml.noaa.gov/grad/solcalc/solareqns.PDF, read on 2026-10-27). The fractional year γ = 2π/365 × (day of year − 1) (366 in leap years) gives the equation of time, eqtime = 229.18 × (0.000075 + 0.001868 cos γ − 0.032077 sin γ − 0.014615 cos 2γ − 0.040849 sin 2γ) minutes, and the declination, decl = 0.006918 − 0.399912 cos γ + 0.070257 sin γ − 0.006758 cos 2γ + 0.000907 sin 2γ − 0.002697 cos 3γ + 0.00148 sin 3γ radians.

At sunrise and sunset the zenith is 90.833° (refraction and the size of the solar disk): ha = arccos(cos 90.833° ÷ (cos lat × cos decl) − tan lat × tan decl). In UTC minutes, sunrise = 720 − 4 × (longitude + ha) − eqtime, sunset = 720 − 4 × (longitude − ha) − eqtime and solar noon = 720 − 4 × longitude − eqtime; the calculator then adds your UTC offset. Day length = 8 × ha minutes.

These are approximate equations, usually within a minute or two at mid-latitudes; terrain and weather are ignored. Near the poles, when the sun stays up or down all day, the times show a dash.

Worked example

Date2026-06-21
Day of the year172
Fractional year γ (rad)2.9436
Equation of time (minutes)-1.3282
Solar declination (degrees)23.452
Sunrise hour angle (degrees)113.2172
Sunrise5:24 AM
Sunset8:30 PM
Solar noon12:57 PM
Day length15 h 06 min

Frequently asked questions

Do I enter EST or EDT?

Enter the offset your clock uses on that date: for New York, −5 in winter (EST) and −4 in summer (EDT).

When are sunrise and sunset at 40.71° N, 74.01° W on June 21, 2026 (EDT)?

About 5:24 AM and 8:30 PM, a day of about 15 h 06 min.

Why does the result show a dash?

At high latitudes the sun can stay above or below the horizon all day (midnight sun or polar night), so there is no sunrise or sunset.

Related calculators