Sunrise & Sunset Time Calculator
Sunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight for 46 preset cities or any latitude and longitude, with golden and blue hours, sun directions and a full monthly table — using the NOAA solar equations.
How it works
cos H = cos z ÷ (cos φ · cos δ) − tan φ · tan δ · sunrise = solar noon − 4·H min, sunset = solar noon + 4·H min · solar noon = 720 − 4·λ − EoT + time-zone offset (minutes) · z = 90.833° for sunrise/sunset, 96° civil, 102° nautical, 108° astronomical twilight
The calculator uses the NOAA solar equations (based on Jean Meeus’s Astronomical Algorithms): for the chosen date it finds the sun’s declination δ — its latitude on the sky, which swings ±23.44° through the year — and the equation of time, the up-to-16-minute gap between clock time and sundial time caused by Earth’s tilt and elliptical orbit. Solar noon is when the sun crosses your meridian; sunrise and sunset sit one hour angle H either side of it, where H depends on your latitude φ, δ and the zenith angle z. Sunrise and sunset use z = 90.833°: the sun’s upper edge touching a sea-level horizon after atmospheric refraction. Civil, nautical and astronomical twilight begin or end when the sun’s centre is 6°, 12° and 18° below the horizon. The photographers’ golden hour is when the sun is between 6° above and 4° below the horizon, and the blue hour between 4° and 6° below. Each event is refined by recomputing the sun’s position at that moment, so results match NOAA and timeanddate to about a minute. Preset cities use their real time zone and daylight saving rules; for a custom location enter the standard UTC offset and switch on daylight saving time when it applies.
Worked example
New York (40.71° N, 74.01° W) on October 18, 2026, on daylight saving time (UTC−4): declination −9.8°, equation of time +14.9 min, so solar noon is 720 + 296.0 − 14.9 − 240 = 761.1 min = 12:41. The hour angle for z = 90.833° is 82.6°, or 330 minutes, so the sun rises at 07:11 and sets at 18:11 — 11 h 01 min of daylight. Civil twilight runs 06:43–18:39, nautical 06:11–19:11 and astronomical 05:39–19:42, and the golden hours are 06:54–07:48 and 17:34–18:28.
Sources: NOAA Solar Calculator · NOAA — Solar Calculation Details · US Naval Observatory — Rise, Set and Twilight Definitions
Frequently asked questions
What is the difference between civil, nautical and astronomical twilight?
They are measured by how far the sun is below the horizon. Civil twilight (0.8°–6°) is light enough for most outdoor activities without lamps; nautical twilight (6°–12°) is when the horizon and brightest stars are both visible to sailors; astronomical twilight (12°–18°) ends when the sky is fully dark for astronomy.
Why is the day longer than 12 hours on the equinox?
Sunrise and sunset are timed when the top edge of the sun touches the horizon, and refraction lifts the sun’s image by about half a degree. Together they add roughly 6–8 minutes to the day almost everywhere, so equal day and night happens a few days before the spring equinox and after the autumn one.
Does daylight saving time change the result?
Preset cities apply their local daylight saving rules automatically. For a custom location, enter the standard offset (for example −5 for New York) and turn on daylight saving time when clocks are on summer time. The sun does not change, only the clock reading.
What are the golden hour and blue hour?
The golden hour is when the sun is low — between 6° above and 4° below the horizon — giving warm, soft light. The blue hour follows sunset (or precedes sunrise) while the sun is 4°–6° below the horizon and the sky turns deep blue. Both are popular with photographers.
Why does the earliest sunset not fall on the shortest day?
Because of the equation of time. Around the December solstice solar noon gets later each day by about 30 seconds, so in mid-northern latitudes the earliest sunset comes in early December and the latest sunrise in early January, while the shortest day is around December 21.
How accurate are the times?
About one minute between 72° N and 72° S for a flat sea-level horizon. Hills, buildings, the observer’s height (which you can enter under More options) and unusual atmospheric refraction can shift the visible sunrise by several minutes, and near the poles the uncertainty grows to around 10 minutes.
What sign does longitude take?
East of Greenwich is positive and west is negative, so New York is −74.01 and Tokyo is +139.65. Latitude is positive north of the equator and negative south of it.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.