🌅 Sunrise & Sunset Calculator

Calculate the exact sunrise and sunset times for any date and location, plus solar noon and total day length.

What time does the sun rise and set where you are? The Sunrise and Sunset Calculator answers this for any date and any major city in the world — instantly, and entirely in your browser. Pick a city and a date, press Calculate, and you get the exact local sunrise time, the solar noon, the sunset time, and the total length of the day from first light to last light.

Photographers plan the golden hour around sunrise and sunset. Commuters use the times to know when it gets dark and the headlights need to go on. Event planners schedule outdoor ceremonies, weddings, and evening markets so the sun is exactly where they want it. Gardeners track the changing day length through the seasons, and travelers want to know how early (or how late) the sun comes up at their destination before they pack the blinds.

For example, in New York City on June 21, 2025, the tool shows a sunrise at 5:24 AM, solar noon at 12:58 PM, a sunset at 8:31 PM, and a day length of 15 hours and 6 minutes. The same city on December 21 gives a sunrise at 7:16 AM, a sunset at 4:33 PM, and a day length of only 9 hours and 17 minutes. That winter-versus-summer difference of almost six hours is exactly what this tool makes visible with one click.



How Does the Calculation Work?

This tool uses the well-established NOAA solar position algorithm — the same public-domain math the U.S. National Oceanic and Atmospheric Administration publishes for sunrise and sunset computations. The calculation works out where the sun is in the sky relative to your coordinates on the chosen date, and then finds the exact moments when the top edge of the sun's disc crosses the horizon, including the ~0.833° correction for atmospheric refraction that makes the sun appear slightly higher than it really is.

The heart of the method is simple geometry. First the tool computes the day's position in the year and the sun's mean anomaly — how far along its yearly orbit the Earth has traveled. From that it derives the sun's true ecliptic longitude, its right ascension (its position along the celestial equator), and its declination (how far north or south of the celestial equator the sun sits on that date). Finally it solves the hour angle — the angular distance between your local meridian and the sun — for the moment when the sun's altitude equals the official sunrise/sunset altitude.

All of this runs entirely in JavaScript on your device. The tool outputs the results as UTC instants and then formats them in the city's own time zone using the browser's built-in time-zone database, so daylight-saving changes are applied automatically and correctly for every location in the list.

Practical Examples

A wedding photographer in Rome wants to book a session in the golden hour: on June 21, 2025 the tool shows sunrise at 5:34 AM and sunset at 8:49 PM, so the best warm light falls roughly between 8:00 and 8:45 PM. A camper planning a July trip to Stockholm discovers the sun rises at 3:41 AM and sets at 10:05 PM — nearly 18 and a half hours of daylight to plan a day around. A New Yorker flying to Sydney in winter checks that sunrise is at 7:00 AM local and sunset at 4:57 PM, meaning late-afternoon plans need to happen well before 5 PM.

The day-length figure is often the most useful single number. Compare two cities on the same date and the seasonal contrast becomes obvious: Reykjavik on June 21 has over 21 hours of daylight, while São Paulo on the same date has barely 10 hours and 40 minutes, because the Southern Hemisphere is in the middle of its winter. Entering your own date and city turns any of these comparisons into a one-click answer.

Edge Cases and Common Pitfalls

The most striking edge case is the polar day and polar night. At latitudes above roughly 66.5° (the Arctic and Antarctic circles), there are periods when the sun never sets in summer or never rises in winter. Tromsø, Norway, for example, has no sunset at all around June 21 and no sunrise around December 21. In those cases the hour-angle equation has no solution, and this tool shows a clear "the sun stays above/below the horizon all day" message instead of a meaningless time.

A second subtlety is atmospheric refraction and the size of the sun's disc. Official sunrise and sunset are defined as the moment the top edge of the sun appears to touch the horizon, not the center — refraction lifts it by about 0.83° on average. That is why the day is a few minutes longer than the naive "the sun's center crossed the horizon" model would suggest. This calculator follows the official convention, so its numbers line up with weather apps and almanacs.

Finally, local geography is not part of the math: the calculation assumes a clear horizon at sea level. Mountains, tall buildings, or heavy haze can delay an actual visible sunrise by several minutes. The values here are the theoretical times for your coordinates, accurate to within a couple of minutes in normal conditions.

Daylight Saving Time and Time Zones

Because the sun's position does not care about the clock, this tool first computes every time in UTC and only then converts it to the city's local time. The conversion uses the IANA time-zone database built into your browser, which knows each region's standard offset and its daylight-saving rules, including the exact dates the clocks change. That means Amsterdam in June automatically reports times in CEST (UTC+2) and Amsterdam in January in CET (UTC+1) — no manual offset guessing, and no off-by-one-hour mistakes when a city near you has different DST rules than you do.

If you need to plan across regions, pair this tool with the Timezone Converter on this site: use it to turn the local sunrise and sunset times into the time zone of someone on the other side of the world, so a sunrise in Tokyo can be translated to a call time in Berlin without confusion.

Frequently Asked Questions

What time does the sun rise and set today?
Select today's date and your city, then press Get Sunrise & Sunset. The tool shows the exact local sunrise time, solar noon, sunset time, and total day length for your location, with daylight-saving time already applied.
How accurate is the sunrise and sunset calculation?
It uses the NOAA solar position algorithm and is accurate to within a couple of minutes for any location with a clear horizon at sea level. Results match weather apps and printed almanacs. Mountains, tall buildings, or haze can delay a visibly observed sunrise by a few extra minutes.
Why isn't the day exactly 12 hours at the equator on the equinox?
Two effects add a few minutes. The equation of time — the difference between solar time and clock time caused by Earth's elliptical orbit — shifts sunrise and sunset asymmetrically, and atmospheric refraction makes both sunrise and sunset appear a few minutes earlier and later than the geometric times, lengthening the day.
Why do the times differ from another sunrise calculator or website?
Differences usually come from the time zone database or the sunrise convention used. This tool uses official sunrise/sunset (the top edge of the sun's disc, including refraction) and the IANA time zone database, so it lines up with standard weather and almanac sources. Always compare times for the same coordinates on the same date.
What happens near the poles where the sun never sets or rises?
At latitudes above the Arctic or Antarctic circle, there are days when the sun never sets (midnight sun) and days when it never rises (polar night). For those dates the tool shows a message that the sun stays above or below the horizon all day instead of a time.
Is my location or date sent to a server?
No. The entire calculation runs locally in your browser. The dates, coordinates, and times you enter never leave your device, and the site does not store or track any of your inputs.

Written by Aren Breur — IT professional with 30+ years of experience and founder of HowManyDays.app.

Every tool on this site is built, tested, and maintained by hand by Aren to be accurate, fast, and privacy-friendly — all calculations run locally in your browser. Found an error or have feedback? Contact us or email aren2connect@gmail.com. Read more about this site.

🔌 Zet deze tool gratis op jouw site · vrije widget, geen registratie