Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Sunrise and sunset calculator

Pick a city or enter coordinates, a date and a time zone. You get sunrise, sunset, solar noon, day length and all three twilights, worked out on your device.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Want the exact start of each season? Use the solstice and equinox calculator. Comparing clock times across places? Try the time zone converter.

What this calculator does

It works out when the sun rises and sets on any date from the year 1000 to 3000, anywhere on Earth. It also gives solar noon (when the sun is highest), the length of the day, and the start and end of civil, nautical and astronomical twilight. Photographers use it for golden hour, sailors and pilots for twilight, and anyone can use it to plan a hike or check how fast the days are getting shorter.

How it's calculated

The calculator uses the same equations as NOAA's Solar Calculator, which are based on Jean Meeus's Astronomical Algorithms. First it finds the sun's declination δ (how far north or south of the equator it is) and the equation of time (how far a sundial runs ahead of or behind a clock). Then it finds the hour angle H at which the sun's center is at the right depth below the horizon:

cos H = (cos z − sin φ × sin δ) ÷ (cos φ × cos δ)
Sunrise (minutes after 0:00 UTC) = 720 − 4 × (λ + H) − equation of time
Sunset = 720 − 4 × (λ − H) − equation of time
Solar noon = 720 − 4 × λ − equation of time

Here φ is the latitude and λ the longitude (east positive). For sunrise and sunset, z = 90.833°. That is the U.S. Naval Observatory's definition: the sun's center is 50 arcminutes below the horizon, which is its average radius (16′) plus average refraction at the horizon (34′). For civil, nautical and astronomical twilight, z is 96°, 102° and 108° (the sun's center 6°, 12° and 18° below the horizon). Like NOAA's calculator, it runs twice, the second time using the sun's position at the first answer.

Worked example: New York, June 21, 2026

At latitude 40.7128° N, longitude 74.006° W, the sun's declination is 23.44° and the equation of time is −1.80 minutes.

cos H = (cos 90.833° − sin 40.7128° × sin 23.44°) ÷ (cos 40.7128° × cos 23.44°) = −0.3940, so H = 113.20°
Sunrise = 720 − 4 × (−74.006 + 113.20) + 1.80 = 565.0 minutes = 9:25 UTC = 5:25 AM EDT

Sunset comes out at 8:31 PM EDT, for a day length of 15 hours 6 minutes. These match NOAA's own table for New York.

Checked against NOAA and the Naval Observatory

Place and dateSunriseSunsetReference
New York, June 21, 20265:25 AM8:31 PMNOAA table; USNO
New York, December 21, 20267:17 AM4:32 PMNOAA table
Los Angeles, December 21, 20266:55 AM4:48 PMNOAA table
Los Angeles, October 27, 20267:08 AM6:05 PMNOAA table
Utqiagvik, Alaska, June 21, 2026NoneNoneUSNO: sun continuously above the horizon

Polar day and polar night

Near the poles, cos H can come out above 1 or below −1, which means the sun never reaches that depth. If it never gets 0.833° below the horizon, the sun doesn't set (polar day, or the midnight sun). If it never gets that high, it doesn't rise (polar night). Twilight works the same way: on a winter day in Tromsø the sun doesn't rise, but there are still a few hours of civil twilight around noon. In summer far north, the sky may never get darker than nautical twilight all night.

Limitations

  • Accuracy. NOAA describes these equations as accurate to within about a minute between 72° north and south, and to within about 10 minutes nearer the poles. They are "very good" between 1800 and 2100.
  • Weather and terrain. Refraction changes with temperature and air pressure. Mountains, buildings or a sea horizon below you also move the moment you see the sun. Results are for a flat, sea-level horizon.
  • Time zones. A zone name like America/Denver applies daylight saving time for that date. A plain offset like −7 never changes.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • New York, June 21, 2026: sunrise 5:25 AM EDT (NOAA table: 05:25) ✓
  • Same day: sunset 8:31 PM (NOAA table: 20:31) ✓
  • Same day: civil twilight begins 4:52 AM (USNO: 04:52) ✓
  • Fixed offset −4 gives the same New York sunrise ✓
  • Los Angeles, Dec 21, 2026: 6:55 AM to 4:48 PM PST (NOAA table) ✓
  • Los Angeles, Oct 27, 2026: 07:08 to 18:05 in 24-hour time (NOAA table) ✓
  • Edge: Utqiagvik, Alaska, June 21: polar day (USNO: continuously above the horizon) ✓
  • Edge: Tromsø, Dec 21: polar night, civil twilight 9:31 AM – 1:53 PM ✓
  • Edge: Reykjavík, June 21: sunset after midnight, 12:04 AM next day ✓
  • Sydney, June 21, 2026 (southern winter): 7:00 AM to 4:54 PM ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What time is sunrise and sunset today?

Pick your city (or type your latitude and longitude), leave the date empty for today, and make sure the time zone is yours. The times update as you type.

What's the difference between civil, nautical and astronomical twilight?

They're defined by how far the sun's center is below the horizon: 6° for civil, 12° for nautical and 18° for astronomical, according to the U.S. Naval Observatory. Civil twilight is bright enough for most outdoor activities; after astronomical dusk the sky is fully dark.

Why isn't solar noon at 12:00?

Solar noon depends on where you are in your time zone and on the equation of time, which shifts sundial time several minutes ahead of or behind clock time through the year. Daylight saving time adds another hour.

Why is sunrise 0.833° and not when the sun touches the horizon?

Sunrise is when the top edge of the sun appears. The sun's center is then about 16 arcminutes (its radius) plus 34 arcminutes of refraction below the horizon, 0.833° in total.

Does the sun ever not rise?

Yes, above the Arctic and Antarctic circles. In Utqiagvik, Alaska, the sun stays up all day around the June solstice and doesn't rise at all around the December solstice.

Related calculators