CalculateItNow home

Sunrise Sunset Calculator

Sunrise, sunset, solar noon, day length and civil twilight for any latitude, longitude and date, from the NOAA solar position algorithm. Polar day and night handled.

Sunrise Sunset Calculator: with the default inputs, sunrise is 06:32.

° N
° E
hours
Try an example
Sunrise
06:32
Sunset
19:14
Solar noon
12:53
Day length
12 h 42 min
Civil twilight begins
06:05
Civil twilight ends
19:41
Sun's altitude at noon
54.03
Solar declination
4.743
Equation of time
3.07
Assumptions
  • Atmospheric refraction is taken as the standard 34 arcminutes; real refraction varies with temperature and pressure.
  • Sunrise and sunset are the upper limb touching a sea-level horizon, so the zenith used is 90.833°.
  • Observer elevation and terrain are ignored; height above sea level makes sunrise earlier.
  • Civil twilight uses a solar zenith of 96° (the Sun 6° below the horizon).
  • Times are wall-clock times at the UTC offset you enter; daylight saving is not applied automatically.
Day length through 2026 at this latitude
051015JanMarMayJulSepNovDec
Hours of daylight
The four turning points of the year here
SunriseSunsetDay lengthNoon altitude (°)
March equinox 202606:5919:0812 h 09 min49.3
June solstice 202605:2520:3115 h 06 min72.7
September equinox 202606:4418:5312 h 10 min49.4
December solstice 202608:1717:329 h 15 min25.8

Equinox and solstice dates shift by a day between years; these are the conventional dates, not the exact instants.

Math verified by automated testsUpdated 2026-09-093 sources cited

How this is worked out

The formula

declination: sin δ = sin ε · sin λ,  with λ the Sun's apparent longitude and ε the corrected obliquity
equation of time: E = 4 · [y·sin 2L₀ − 2e·sin M + 4e·y·sin M·cos 2L₀ − ½y²·sin 4L₀ − 1¼e²·sin 2M],  y = tan²(ε/2)
solar noon (minutes after local midnight) = 720 − 4·longitude − E + 60·UTC offset
sunrise hour angle: cos H = [cos 90.833° − sin φ · sin δ] ÷ (cos φ · cos δ)
sunrise = solar noon − 4H,  sunset = solar noon + 4H,  day length = 8H minutes

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Latitude
Positive north, negative south. New York is 40.71, Sydney −33.87.from -90 to 90 · defaults to 40.7128
Longitude
Positive east, negative west. New York is −74.01, Berlin +13.40.from -180 to 180 · defaults to -74.006
Date
A calendar date.defaults to today
Time zone offset from UTC
Include daylight saving if it is in force on that date — −4 for US Eastern in summer, −5 in winter.from -12 to 14 · defaults to -4

What you get back

Sunrisemain answer
Sunset
Solar noon
When the Sun crosses the meridian — rarely 12:00, because of longitude within the zone and the equation of time.
Day length
Civil twilight begins
Sun 6° below the horizon: enough light to read outdoors and see the horizon at sea.
Civil twilight ends
Sun's altitude at noon
Degrees above the horizon at its highest.
Solar declination
Equation of time
Minutes by which a sundial runs ahead of the clock.

What this assumes

  • Atmospheric refraction is taken as the standard 34 arcminutes; real refraction varies with temperature and pressure.
  • Sunrise and sunset are the upper limb touching a sea-level horizon, so the zenith used is 90.833°.
  • Observer elevation and terrain are ignored; height above sea level makes sunrise earlier.
  • Civil twilight uses a solar zenith of 96° (the Sun 6° below the horizon).
  • Times are wall-clock times at the UTC offset you enter; daylight saving is not applied automatically.

About this calculator

Sunrise, sunset, solar noon, day length and civil twilight for any point on Earth and any date, from the solar position algorithm NOAA publishes with its own solar calculator — which is in turn a condensation of Jean Meeus's Astronomical Algorithms.

How it works

Three quantities do all the work. The solar declination is how far north or south of the celestial equator the Sun sits, swinging between ±23.44° over the year. The equation of time is the difference between a sundial and a clock, up to about 16 minutes either way, caused by Earth's elliptical orbit and the tilt of its axis. Together with your longitude, they fix solar noon. The hour angle then says how far before and after noon the Sun crosses the horizon:

cos H = [cos 90.833° − sin φ · sin δ] ÷ (cos φ · cos δ)

The 90.833° is not an accident. It is 90° plus 34 arcminutes of average atmospheric refraction — which lifts the Sun's image so that it appears to rise before it geometrically does — plus 16 arcminutes for the Sun's own radius, because sunrise is conventionally the moment the upper limb touches the horizon, not the centre.

Accuracy, and what it ignores

Compared with published almanac times this lands within a minute at mid latitudes. Three things limit it, and all three grow towards the poles:

  • Refraction is assumed constant at the standard 34′. Real refraction depends on temperature and pressure and can vary by several arcminutes near the horizon, which is worth a minute or two at mid latitudes and much more above 60°. On some days it can shift high-latitude sunrise by tens of minutes.
  • Elevation is ignored. A higher viewpoint sees the Sun earlier. The dip of the horizon is roughly 1.75′ × √(height in metres), so 100 m of elevation moves sunrise about four minutes earlier.
  • The horizon is assumed flat and unobstructed. Mountains and buildings will beat any calculation.

Where the Sun does not cross the horizon at all, the calculator says so rather than returning nonsense: inside the Arctic and Antarctic circles you will get polar night or continuous daylight instead of a time, and it still reports whether civil twilight occurs, which is often the more useful answer in a polar winter.

Reading the results

Solar noon is almost never 12:00. Two things move it: your longitude within a time zone (four minutes per degree — a wide zone can shift noon by well over an hour) and the equation of time. In late October a sundial runs about 16 minutes ahead of the clock; in mid-February about 14 minutes behind.

Day length is 8 minutes per degree of hour angle. It always slightly exceeds 12 hours at the equinox — about 12 h 07 min at the equator — because refraction and the Sun's disc both add a few minutes at each end. That is also why the equinox is not the day of exactly equal light and dark; that day, the equilux, falls a few days earlier or later depending on latitude.

Civil twilight is the Sun 6° below the horizon: bright enough to see the horizon at sea and to read outdoors. It runs 20–35 minutes at mid latitudes and stretches enormously towards the poles, which is why a Scandinavian summer night never really goes dark.

Frequently asked questions

Why is solar noon not at 12:00?

Two reasons. Your longitude inside the time zone shifts it by four minutes per degree, and the equation of time — from Earth's elliptical orbit and axial tilt — shifts it by up to about 16 minutes either way.

Why is the day longer than 12 hours at the equinox?

Sunrise is defined as the upper edge of the Sun touching the horizon, and atmospheric refraction lifts its image by about half a degree. Together those add roughly seven minutes at the equator and more at higher latitudes.

What is civil twilight?

The period when the Sun's centre is between the horizon and 6° below it. There is enough natural light to read outdoors and to make out the horizon at sea; it lasts 20–35 minutes at mid latitudes.

How accurate is this calculator?

Within about a minute at mid latitudes. It assumes standard refraction, sea level and a flat horizon, so accuracy falls off near the poles, at altitude, and in unusual weather.

What happens inside the Arctic Circle?

For part of the year the Sun never rises or never sets. The calculator reports polar night or continuous daylight instead of a time, and still tells you whether civil twilight occurs — in deep winter there is often a few hours of usable light around midday even with no sunrise.

Put this calculator on your own site

A working sunrise & sunset, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Sunrise Sunset Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a sunrise & sunset.

All science calculators·Browse everything