Pick a date and click the map — or search for a city by name — to instantly get sun times, expressed in the local time zone of the location (daylight saving included). The tool correctly handles polar latitudes beyond the Polar Circle, where the Sun can stay above or below the horizon for days. If you want to compare two cities, use the day length comparison page.
Sunrise sunset calculator
Click the map or search a place by name.
The time zone is determined automatically based on the selected location, daylight saving included.
Coordinates: 41.9028, 12.4964 · Time zone: —
Day/night trend over the period
White area: day length. Black area: night length. The animation builds the chart day by day in 10 seconds.
—
Twilights
How to use this calculator
- Pick a date in the "Start date" field (today by default). The "End date" is only used for the annual trend chart.
- Select a location by clicking the map, dragging the marker, searching a city by name, or using the "Use my location" button.
- Read the results: sunrise, sunset, day length, night length, and the three twilights (civil, nautical, astronomical) appear automatically in the cards.
- Share the result with the "Share" button: you get a link that reproduces the same calculation on any device.
How the calculation works (NOAA algorithm)
The calculation engine implements the official NOAA (National Oceanic and Atmospheric Administration) algorithm, the international standard for accurate solar calculations. The procedure has four steps: the date is converted to a Julian day (a continuous day count used in astronomy), solar declination and equation of time are computed, and finally combined with the location's latitude to obtain sunrise and sunset times.
The convention used is the international one: sunrise and sunset correspond to the moment when the upper edge of the Sun touches the horizon, accounting for average atmospheric refraction. Typical accuracy is within one minute for latitudes between -60° and +60°; near the poles accuracy degrades slightly because the Sun crosses the horizon at a very shallow angle.
The three twilights: civil, nautical, astronomical
After sunset, complete darkness doesn't fall immediately: there's a "half-light" phase caused by the atmosphere scattering the Sun's rays from below the horizon. Astronomers divide this phase into three twilights, based on how far the Sun has dropped:
- Civil twilight (Sun from 0° to -6°): when the streetlights come on. The sky is still bright enough to walk, read outdoors, drive without headlights. This is the golden hour beloved by photographers. It typically lasts 25-35 minutes.
- Nautical twilight (Sun from -6° to -12°): at sea the horizon line is still visible, hence the name (sailors used it to navigate with the sextant). The sky turns dark blue, the brightest stars appear. It lasts another 25-35 minutes.
- Astronomical twilight (Sun from -12° to -18°): to the naked eye it already looks like full night, but for telescopes there's still scattered light disturbing the observation of galaxies and nebulae. Only when astronomical twilight ends does true night begin, with completely dark sky.
At high latitudes in summer (Oslo, Stockholm, Reykjavík) astronomical twilight never ends: these are the so-called white nights, when full night never occurs between sunset and the next sunrise.
The animated day length chart
Below the map, a chart shows the trend of day length and night length over the solar year (or any interval up to one year). The light area at the bottom represents the day length, the dark area at the top the night length. The "profile" separating the two areas tells at a glance how light lengthens and shortens through the seasons.
Every time you change date or location, the chart rebuilds with a 10-second animation. You can control it with Play/Pause, Reset and the speed buttons ½× · 1× · 2×. During the animation, a line below the chart shows date, sunrise, sunset, day length and night length for the day being drawn.
Solstices, equinoxes and notable days of the year
During the year the Sun follows a cycle that reaches four notable points:
- Summer solstice (June 21 in the northern hemisphere): the longest day of the year. About 15h 14m of daylight in Rome, over 18h in Stockholm, the Sun never sets in Tromsø.
- Winter solstice (December 21 in the northern hemisphere): the shortest day. About 9h 8m of daylight in Rome, only 6h in Stockholm, the Sun never rises in Tromsø (polar night).
- Spring equinox (March 20-21): day and night nearly equal worldwide.
- Autumn equinox (September 22-23): again about 12 hours of daylight everywhere.
Enter one of these dates in the calculator to see the precise sun times for your city.
Day length in selected cities: verified examples
Values calculated for June 21, 2026 (boreal summer solstice), comparable to official NOAA data:
| Location | Latitude | Sunrise | Sunset | Day length |
|---|---|---|---|---|
| Miami | 25.8° N | 06:30 | 20:15 | 13h 45m |
| Rome | 41.9° N | 05:35 | 20:49 | 15h 14m |
| New York | 40.7° N | 05:25 | 20:31 | 15h 06m |
| London | 51.5° N | 04:43 | 21:22 | 16h 39m |
| Stockholm | 59.3° N | 03:30 | 22:07 | 18h 37m |
| Reykjavík | 64.1° N | 02:55 | 00:04 | 21h 09m |
| Tromsø | 69.6° N | — | — | 24h (midnight sun) |
Same table at December 21, 2026 (boreal winter solstice):
| Location | Sunrise | Sunset | Day length |
|---|---|---|---|
| Miami | 07:03 | 17:35 | 10h 32m |
| Rome | 07:34 | 16:42 | 9h 08m |
| New York | 07:17 | 16:32 | 9h 15m |
| London | 08:04 | 15:53 | 7h 49m |
| Stockholm | 08:43 | 14:47 | 6h 04m |
| Tromsø | — | — | 0h (polar night) |
Compare two cities: dedicated page
If you want to graphically compare day length between two cities over a period of time (e.g. Rome vs Sydney throughout the year, or Oslo vs Palermo in December), use the dedicated day length comparison between two cities page: two side-by-side maps, two overlapping curves and a 30-second animation to see how sunlight changes in both locations over the same interval.
Frequently asked questions
Where is there more daylight in winter?
In winter, locations closer to the equator have longer days. In Europe, the Canary Islands, Sicily, Malta, Andalusia and Cyprus offer 10 to 11 hours of daylight at the winter solstice, against the 6-7 hours of Stockholm or Helsinki. In the United States, Florida and Hawaii have the longest winter days. For a visual comparison between two specific locations, use the comparison page.
How many hours of daylight at the winter solstice?
At the winter solstice (December 21) day length depends on latitude. Examples: Miami ~10h 32m, Los Angeles ~9h 53m, New York ~9h 15m, Rome ~9h 08m, London ~7h 49m, Stockholm ~6h 04m. The further north, the shorter the day. South of the equator the situation is reversed: Sydney has its longest day in December.
Does the tool handle daylight saving time?
Yes, automatically. The time zone is determined from the selected location via the world IANA timezone map; daylight saving time for the chosen date is computed by the browser using the standard Intl.DateTimeFormat API. You don't need to set anything manually.
What happens beyond the Arctic or Antarctic Polar Circle?
At latitudes above approximately 66.5° in absolute value, the Sun can stay above the horizon for consecutive days (midnight sun) or below the horizon (polar night). The calculator automatically recognizes these cases and displays a dedicated message instead of times.
Where does the map come from?
The map is provided by OpenStreetMap, the free collaborative mapping project. The name search uses Nominatim, the official OpenStreetMap geocoder. Both services are free and require no API keys.
Can I use the tool offline?
The astronomical calculation and the chart happen locally inside the browser. Once the page is loaded you can disconnect from the network: changing date or location will continue to work. Map tiles (OpenStreetMap) and name search remain network-dependent.
The NOAA algorithm is considered the de facto reference for medium-precision solar calculations. It is publicly documented by the Global Monitoring Laboratory of the U.S. agency and is the basis of most online solar calculators.