Sunrise Sunset Calculator: Any City, Solar Noon & Twilight

Sunrise Sunset Calculator

This sunrise-sunset calculator shows when the Sun rises and sets for any date and place, plus solar noon, day length, and all three twilights. Enter a date, a city or coordinates, and your time zone, and the results appear instantly.

 

Key facts

  • The Sun appears to move about 15° across the sky each hour.
  • Atmospheric refraction lifts the Sun’s image by about 0.5° at the horizon.
  • Results are accurate to about 1 minute for most of the world, and up to 10 minutes above 72° latitude.
  • Solar noon is rarely exactly 12:00.

Those times shift every single day. Earth spins at 15° an hour, but its tilted axis and slightly oval orbit move the Sun’s path a little each morning. Latitude, longitude, and the day of the year together decide the answer, which is why a formula beats guessing.

Sunrise sunset calculator results for New York showing sunrise at 7:23 AM and sunset at 5:56 PM

Why Sunrise Comes Before the Sun Is Up

At the official sunrise time, the Sun is still geometrically below the horizon. Earth’s atmosphere bends its light upward, lifting the image by about half a degree, so you see the Sun a couple of minutes before it truly rises and after it truly sets.

That’s why astronomers define sunrise and sunset by the Sun’s upper edge, not its center. Sunrise is the moment the top of the disc touches a flat sea horizon; sunset is the moment it slips out of sight. Standard calculations build in average refraction, so the times match what you actually see.

The effect adds a few minutes of daylight every day. Near the equator, the Sun takes about two minutes to clear the horizon completely, and much longer at high latitudes, where it rises at a shallow slant instead of climbing straight up.

How to Use the Sunrise Sunset Calculator

Pick a date, choose a city or enter coordinates, confirm your time zone, and press Calculate. Results for sunrise, sunset, solar noon, day length, and twilight appear together.

  1. Pick a date. Today is filled in by default; choose any other day, past or future.
  2. Choose a city, or type your latitude and longitude. Picking a city fills in the coordinates and time zone for you.
  3. Check the time zone and daylight saving setting so results show in your local clock time.
  4. Choose what to display: day length, solar noon, and civil, nautical, or astronomical twilight, in 12-hour or 24-hour format.
  5. Press Calculate. Everything updates at once.

Entering latitude and longitude

The sign is the part people get wrong. Latitude is positive north of the equator and negative south of it. Longitude is positive east of the Prime Meridian and negative west of it. One wrong minus sign can move you to the other side of the planet.

CityLatitudeLongitudeHemispheres
London51.51−0.13North, West
New York40.71−74.01North, West
São Paulo−23.55−46.63South, West
Istanbul41.0128.98North, East
Sydney−33.87151.21South, East

You can type decimal degrees, as in the table, or degrees and minutes. To find the exact coordinates of any spot, right-click it in Google Maps; the latitude and longitude appear at the top of the menu, and one click copies them.

Time zone and daylight saving

Solar positions are worked out in Universal Time (UTC), then converted to your clock. That conversion needs your UTC offset. New York, for example, is UTC−5 in winter and UTC−4 when daylight saving is on. If you’re unsure of an offset, the Time Zone Converter shows it.

Some official tables list times in standard time only, leaving daylight saving to you. If your results look exactly one hour off, the daylight saving setting is almost always the reason.

Reading Your Sunrise Sunset Calculator Results

A full result holds more than two times. Each line answers a slightly different question, and knowing which one you need saves second-guessing.

ResultWhat it tells you
SunriseWhen the Sun’s upper edge first appears on the horizon
SunsetWhen the Sun’s upper edge disappears below the horizon
Solar noonWhen the Sun is highest in the sky, halfway between sunrise and sunset
Day lengthTotal daylight from sunrise to sunset
Day-length changeHow much longer or shorter today is than yesterday
Dawn and duskWhen each type of twilight begins and ends

A positive day-length change means days are growing, which happens between the December and June solstices in the Northern Hemisphere. A negative change means they’re shrinking. To measure the gap between any two clock times yourself, the Time Duration Calculator does it in one step.

Dawn, Dusk, and the Three Types of Twilight

Twilight is the stretch when the sky is lit, but the Sun is below the horizon. It comes twice a day, and three kinds are defined by how deep the Sun’s center sits below the horizon: civil, nautical, and astronomical.

TwilightSun’s center below horizonMorningEveningWhat you can see
Civil0.83° to 6°Civil dawn to sunriseSunset to civil duskEnough light for most outdoor tasks without lamps
Nautical6° to 12°Nautical dawn to civil dawnCivil dusk to nautical duskHorizon still faintly visible at sea; bright stars appear
Astronomical12° to 18°Astronomical dawn to nautical dawnNautical dusk to astronomical duskSky nearly dark; faint stars still washed out

When people say “dawn” or “dusk” in everyday speech, they almost always mean civil twilight. Sailors historically relied on nautical twilight to take star sightings against a still-visible horizon. Stargazers wait for astronomical dusk, when the last glow fades, and the sky turns fully dark. These angle definitions follow the U.S. Naval Observatory; its article The Different States of Twilight explains each stage in more detail.

[Image: diagram of the Sun’s angle below the horizon for each twilight type. Alt text: “Diagram of civil, nautical, and astronomical twilight showing the Sun at 6°, 12°, and 18° below the horizon.”]

Golden Hour and Blue Hour Times

Two photographer favorites sit on either side of twilight. Golden hour is the period after sunrise and before sunset when the Sun is low, roughly up to 6° above the horizon, and the light is soft and warm. It usually lasts about an hour, but runs longer at high latitudes and shorter near the equator. Blue hour is the stretch when the Sun is roughly 4° to 8° below the horizon, and the sky turns deep blue; it falls inside civil and nautical twilight. The calculator’s sunrise, sunset, dawn, and dusk times show you when to expect both.

Why Solar Noon Is Rarely 12:00

Solar noon is the moment the Sun peaks, due south for most of the Northern Hemisphere. It rarely lands on 12:00, because of two separate effects.

The first is longitude. Time zones are built around meridians 15° apart, and every degree east or west of your zone’s meridian shifts solar noon by 4 minutes. Madrid is about 3.7° west of Greenwich but uses Central European Time, built around 15° E. In summer, with daylight saving, its clocks follow the 30° E meridian, which puts Madrid roughly 33.7° west of it, more than two hours of solar time. In June, solar noon in Madrid lands at around 2:15 PM.

The second is the equation of time. Earth’s tilted axis and oval orbit make the Sun run fast or slow through the year, moving solar noon earlier or later by up to about 16 minutes. The calculator applies both corrections automatically. For the math behind the second effect, see this Irish Mathematical Society paper on the equation of time and the analemma.

How Day Length Changes Through the Year

Day length depends far more on latitude than most people expect. At the equator it barely moves; at 60° it swings by 13 hours between the solstices. These figures include refraction, which is why even the equinox runs slightly over 12 hours.

Latitude (north)March or September equinoxJune solsticeDecember solstice
0°12 h 07 min12 h 07 min12 h 07 min
20°12 h 07 min13 h 20 min10 h 55 min
30°12 h 08 min14 h 05 min10 h 13 min
40°12 h 09 min15 h 01 min9 h 19 min
50°12 h 10 min16 h 22 min8 h 04 min
60°12 h 13 min18 h 52 min5 h 52 min

In the Southern Hemisphere, swap the two solstice columns: June brings the shortest days and December the longest. For mid-latitudes, sunrise and sunset times repeat within about two minutes from one year to the next, so a table from last year still works.

[Image: line chart of day length by latitude across the year. Alt text: “Line chart showing day length through the year at 0°, 30°, 50°, and 60° north latitude.”]

Earliest sunrise and latest sunset of the year

They don’t fall on the solstice. At mid-latitudes in the Northern Hemisphere, the earliest sunrise comes about a week before the June solstice and the latest sunset about a week after it. The equation of time causes this offset. The earliest sunset arrives in early December, before the shortest day, and the latest sunrise in early January, after it. Southern Hemisphere dates are mirrored.

How Accurate Is a Sunrise Sunset Calculator?

For most of the world, results are accurate to about a minute. The limit isn’t the math; it’s the air. Temperature changes near the horizon alter refraction enough to shift observed times by a minute or two, so results are rounded using average conditions.

Your surroundings matter too. The calculation assumes a flat sea horizon, so a ridge to the east delays the sunrise you actually see, while a high viewpoint over open ground brings it slightly earlier. Tall buildings do the same in cities.

Accuracy drops closer to the poles. Above about 72° latitude, results can be off by up to 10 minutes, because the Sun meets the horizon at such a shallow angle that a tiny change in refraction moves the time a lot. NOAA’s Solar Calculator notes the same limit.

Polar days and polar nights

Far enough north or south, some days have no sunrise or no sunset at all. The calculator then shows no time for that event instead of a wrong one. Here’s where each threshold falls around the solstices.

What happens at the solsticeLatitude beyond which it occurs
The Sun doesn’t set (midnight sun)About 65.7°
The Sun doesn’t rise (polar night)About 67.4°
Civil twilight lasts all nightAbout 60.6°
Nautical twilight lasts all nightAbout 54.6°
Astronomical twilight lasts all nightAbout 48.6°

That last row surprises people. Across much of northern Europe and Canada, the sky never gets fully dark for a few weeks around the June solstice, which is frustrating for astronomers and lovely for evening walks.

The Formula Behind the Sunrise Sunset Calculator

The tool uses a well-established method based on the Sun’s position, the same family of formulas behind published almanacs. You don’t need it to use the calculator, but seeing the steps explains why latitude, longitude, and date all matter.

In these formulas, longitude is negative west of the Prime Meridian, λh is longitude divided by 15, and n is the day of the year.

  1. Approximate time: t = n + (6 − λh) / 24 for sunrise, or t = n + (18 − λh) / 24 for sunset.
  2. Sun’s mean anomaly: M = 0.9856 × t − 3.289
  3. Sun’s true longitude: L = M + 1.916 × sin(M) + 0.020 × sin(2M) + 282.634
  4. Right ascension: RA = arctan(0.91764 × tan(L)), placed in the same quadrant as L, then divided by 15.
  5. Declination: sin(δ) = 0.39782 × sin(L)
  6. Hour angle, with latitude φ and zenith 90.833° (which builds in refraction and the Sun’s radius): cos(H) = (cos(zenith) − sin(δ) × sin(φ)) / (cos(δ) × cos(φ)). Use 360° − H for sunrise and H for sunset.
  7. Local mean time: T = H / 15 + RA − 0.06571 × t − 6.622
  8. Clock time: subtract λh to get UTC, then add your time zone offset, plus one hour if daylight saving applies.

Calculating twilight times

Twilight uses the same method. Replace the zenith of 90.833° with 96° for civil twilight, 102° for nautical twilight, or 108° for astronomical twilight. The sunrise-side result is the start of that twilight, and the sunset-side result is its end.

Keeping angles and times in range

If you work the formula by hand, wrap angles (M, L, RA) into 0°–360° and times (T and the final UTC value) into 0–24 hours by adding or subtracting 360 or 24 as needed. Skipping this step is the most common reason a hand calculation comes out hours off.

When the formula returns no answer

If cos(H) is greater than 1, the Sun never rises that day. If it is less than −1, the Sun never sets. This is exactly what happens during polar night and the midnight sun.

Worked example: 16 March at 45° N, 15° W

In a normal (non-leap) year, 16 March is day 75. At 15° W, λh is −1, so t is 75.2917 for sunrise and 75.7917 for sunset. Running the steps in UTC gives these results:

ValueResult
Sunrise7:12 UTC
Sunset19:07 UTC
Solar noon (midpoint)13:09 UTC
Day length11 hours 55 minutes

The answer passes two sanity checks. Solar noon lands about an hour after 12:00 UTC, matching 15° of west longitude plus the mid-March equation of time. And the day is just under 12 hours, as it should be a few days before the March equinox.

Who Uses Sunrise and Sunset Times

Photographers plan around the soft, warm light just after sunrise and before sunset. Hikers and campers check sunset so they’re off the trail before dark. Gardeners and farmers track day length, since many plants respond to it.

Some uses carry rules. Many road codes tie headlight use to the hours after sunset, and aviation relies on exact daylight and twilight times. Hunting seasons in many regions set legal hours by sunrise and sunset; if your authority publishes official times, follow those rather than any calculator.

A few practical pairings help. Prefer times like 19:07 over 7:07 PM? The Military Time Converter switches formats. Want to watch the minutes tick down to sunset? Use the Countdown Timer. Planning a date months in advance? The Date Calculator finds it.

Sources and Method for the Sunrise Sunset Calculator

The calculator uses the sunrise and sunset algorithm from the Almanac for Computers (1990), published by the United States Naval Observatory’s Nautical Almanac Office. It uses a zenith of 90.833°, which accounts for atmospheric refraction and the Sun’s apparent radius.

We checked results against NOAA’s Solar Calculator and the formulas in Jean Meeus’s Astronomical Algorithms. For typical locations, our times agree with these references to within about a minute.

Small differences between websites are normal. They come from rounding, the refraction model, and whether a tool uses the Sun’s upper edge or its center. For legally binding times, such as hunting hours or aviation, use the official tables from your local authority.

Frequently Asked Questions

What is atmospheric refraction?

It’s the bending of light as it passes through Earth’s atmosphere. Refraction lifts the Sun’s image by about half a degree near the horizon, so you see it a couple of minutes before it geometrically rises and after it sets.

Why doesn’t solar noon happen at 12:00?

Two reasons. Your longitude sits east or west of your time zone’s meridian, adding 4 minutes per degree, and the equation of time shifts solar noon by up to about 16 minutes through the year.

How do I calculate daylight hours?

Subtract the sunrise time from the sunset time for your location and date. The method stops working above the polar circles on days with no sunrise or no sunset, when there’s nothing to subtract.

How fast does the Sun move across the sky?

About 15° per hour, because Earth turns 360° in roughly 24 hours. The Sun’s disc is about half a degree wide, so it takes around two minutes to fully rise at the equator, and longer at higher latitudes.

What’s the quickest way to estimate the sunrise hour angle?

Estimate the Sun’s declination with δ = 23.45 × sin((284 + n) × 360/365), where n is the day of the year. Then ω = arccos(−tan φ × tan δ). The Sun rises ω degrees, or ω/15 hours, before solar noon.

Are sunrise and sunset times the same every year?

Nearly. At mid-latitudes, they repeat within about two minutes from year to year, mostly because of the leap-year cycle. A table for one year works well for the next.

What is golden hour, and when is it?

Golden hour is the period after sunrise and before sunset when the Sun is low, roughly up to 6° above the horizon, and the light is soft and warm. It usually lasts about an hour. Use the calculator’s sunrise and sunset times as your starting point.

What is blue hour?

Blue hour is the stretch of twilight when the Sun is roughly 4° to 8° below the horizon, and the sky turns deep blue. It falls inside civil and nautical twilight, so the calculator’s dawn and dusk times show you when to expect it.

Why do sunrise times differ between websites?

Most differences are under two minutes. They come from the zenith angle used (the Sun’s upper edge or its center), the refraction model, rounding, and whether the time shown includes daylight saving. If two sites disagree by exactly one hour, check the time zone and daylight saving settings first.

When are the earliest sunrise and latest sunset of the year?

They don’t fall on the solstice. In the Northern Hemisphere at mid-latitudes, the earliest sunrise comes about a week before the June solstice and the latest sunset about a week after it. The earliest sunset arrives in early December and the latest sunrise in early January.

How do I find sunrise and sunset times for my exact location?

Choose your city, or enter your latitude and longitude, then confirm your time zone and daylight saving setting. For a precise spot, right-click it in Google Maps and copy the coordinates. Nearby cities can differ by a few minutes, so coordinates give the best result.

Related Calculators