Sunrise and Sunset Calculator

Find sunrise, sunset, golden hour and twilight for any place and date, all year round.

How it's worked out

The tool uses the solar equations published by NOAA's Global Monitoring Laboratory, run in your browser. Nothing is looked up online, and your location is never sent anywhere. First it finds two numbers for the date: the Sun's declination δ, which is how far north or south of the equator it is overhead, and the equation of time E, the few minutes by which a sundial runs ahead of or behind a clock. Then it finds the hour angle ω at which the Sun reaches a set height:

cos⁡ω\displaystyle \cos \omega=cos⁡zcos⁡φcos⁡δ−tan⁡φtan⁡δ\displaystyle {}= \frac{\cos z}{\cos \varphi \cos \delta} - \tan \varphi \tan \delta
sunrise\displaystyle \text{sunrise}=720−4(λ+ω)−E\displaystyle {}= 720 - 4(\lambda + \omega) - Esunset\displaystyle \text{sunset}=720−4(λ−ω)−E\displaystyle {}= 720 - 4(\lambda - \omega) - E

φ is your latitude and λ your longitude in degrees, east positive. The answers are minutes after midnight in UTC, and the tool adds your time zone's offset for that date, daylight saving included. The Earth turns 1° every 4 minutes, which is where the 4 comes from.

The zenith angle z sets which moment you get. Sunrise and sunset use 90.833°: the top edge of the Sun touches a flat horizon, and the air bends its light up by about half a degree. Civil, nautical and astronomical twilight use 96°, 102° and 108°. If the cosine comes out above 1 or below −1, the Sun never reaches that height that day: polar night or the midnight sun.

When you choose Today, the date comes from your device. The server cannot see that, so the page first shows the date it was built, then switches to your date as it loads.

Worked examples

A June wedding in Chicago

Maya and Jordan marry outdoors in Chicago on Sat, Jun 20, 2026. Sunset is at 8:29 pm, and the Sun drops below 6° at 7:46 pm, which starts the evening golden hour. Their photographer books portraits from 7:46 pm and has usable light until civil dusk at 9:03 pm.

Open this example in the tool

Running before work in London

Priya runs before her 9 am start in London. On Tue, Dec 15, 2026, civil dawn is at 7:19 am and sunrise at 7:59 am, with only 7 h 53 min of daylight. A 7:00 am run is in the dark, so she plans a lit route or moves the run to lunchtime, when the Sun is at its highest of 15.3°.

Open this example in the tool

Midnight sun in Tromsø

Tromsø, Norway, sits at 69.6° north, above the Arctic Circle. In 2026 the Sun does not set there for 70 days, from May 19 to Jul 27, and does not rise for 48 days around midwinter. Choose Tromsø and drag the point across the year to watch the daylight line climb to 24 hours and drop to zero.

Open this example in the tool

Reading your result

The big times are sunrise and sunset in the place's local time. Day length is the time between them. In New York it runs from 9 h 15 min around Dec 22 to 15 h 6 min around Jun 22. Near the solstices day length changes by only seconds a day, so the tool marks the day its sums find longest or shortest.

The bands of light are set by how far the Sun is below the horizon. These are the U.S. Naval Observatory's definitions:

  • Civil twilight, down to 6° below: enough light for most outdoor work without lamps.
  • Nautical twilight, 6° to 12° below: the horizon at sea is still visible for navigation.
  • Astronomical twilight, 12° to 18° below: the sky is dark to the eye, but faint stars and galaxies are still washed out.

Photographers talk about golden hour, when the Sun is low and warm, and blue hour, just after it has set. The tool uses 6° above to 4° below for golden hour and 4° to 6° below for blue hour. Hills, buildings and haze move these by a few minutes.

Clock changes move sunrise and sunset but not the daylight. New York's clocks go back on November 1, 2026: sunrise is 7:24 am on October 31 and 6:25 am the next morning.

Common mistakes

  • Mixing up the sign of longitude. West is negative. New York is −74.006; typing 74.006 puts you in Central Asia, with sunrise hours off.
  • Showing times in the wrong zone. For your own coordinates, set the time zone too. Phoenix stays on UTC−7 all year, while Denver, in the same Mountain time zone, moves to UTC−6 in summer.
  • Expecting dark right after sunset. In London on June 21, civil twilight lasts 48 minutes after sunset, and the Sun never sinks 18° below the horizon, so the sky never gets fully dark.
  • Trusting the minute in the mountains. The times assume a flat horizon at sea level. A ridge to the east can hide the Sun for many minutes after the sunrise shown here.

Questions people ask

Sources

Maintained by Updated October 28, 2026Checked against 20 reference values