Sunrise and Sunset Calculator

Find sunrise, sunset, solar noon, day length and civil twilight times for any date and place on Earth, using a preset city or your own latitude and longitude. Example: New York on June 21, 2026 has about 15 hours 6 minutes of daylight, with sunrise near 5:25 AM and sunset near 8:31 PM.

FreeNo sign-up

How to use the Sunrise and Sunset Calculator

  1. Pick a city, or choose Custom and enter latitude, longitude and UTC offset.
  2. Choose the date.
  3. Press Calculate for sunrise, sunset, solar noon, day length and twilight.

Formula and method

The sun’s declination and the equation of time give the hour angle H at which the sun reaches the horizon: cos H = (cos 90.833 – sin(lat) sin(dec)) / (cos(lat) cos(dec)). Sunrise and sunset occur at solar noon minus and plus H/15 hours. The 90.833 degree zenith includes the sun’s radius and atmospheric refraction. Civil twilight uses 96 degrees.

Worked example: New York, June 21, 2026

Item Time
Sunrise 5:25 AM
Solar noon 12:58 PM
Sunset 8:31 PM
Day length 15 h 6 m

Day length around the year at 40 degrees north

Date Daylight
Dec 21 (winter solstice) About 9 h 15 m
Mar 20 (equinox) About 12 h 8 m
Jun 21 (summer solstice) About 15 h 0 m
Sep 22 (equinox) About 12 h 8 m

Why days get longer and shorter

Earth’s axis is tilted about 23.4 degrees. As Earth orbits the sun, each hemisphere leans toward or away from it, which changes how high the sun climbs and how long it stays above the horizon. The effect grows with latitude.

Twilight

Civil twilight is when the sun is up to 6 degrees below the horizon: it is bright enough to see outdoors without lights. Nautical and astronomical twilight follow, down to 12 and 18 degrees.

Frequently asked questions

How are sunrise and sunset calculated?

From the sun’s position for your latitude, longitude and date.

Why is solar noon not at 12:00?

Time zones are wide, and the equation of time shifts the sun by up to about 16 minutes through the year.

What is civil twilight?

The period before sunrise and after sunset when the sun is less than 6 degrees below the horizon.

Why does the sun not set in summer near the poles?

Above the Arctic and Antarctic circles the tilt keeps the sun above the horizon for weeks.

How accurate is this?

Typically within a minute or two.

Is daylight saving time included?

Yes for the preset cities; for custom locations enter the offset in effect.

Sources

Related calculators

Browse all calculators

Related to This Article

What people say about "Sunrise and Sunset Calculator: Times, Day Length & Twilight for Any Place"?

No one replied yet.

Leave a Reply