🌅 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.
Try also:
Frequently Asked Questions
🔌 Zet deze tool gratis op jouw site · vrije widget, geen registratie