How to use this calculator
The sunrise and sunset calculator shows when the sun rises and sets for a chosen city on a chosen date. It starts with your own city and today’s date; pick another city from the list or another date to recalculate. Alongside sunrise and sunset it shows solar noon, civil dawn and civil dusk, the length of the day, and how much longer or shorter that day is than the one before. A table below lists the same values for every day of the selected month.
All times are shown in the city’s own time zone, with daylight saving time applied when it is in effect on that date, so the result can be compared directly with local clocks there. Far from the equator the sun may stay above the horizon all day in summer or below it all day in winter. On those dates the calculator reports polar day or polar night instead of sunrise and sunset times, because those events do not happen.
Formula and calculation method
cos H = (sin(−0.833°) − sin φ × sin δ) ÷ (cos φ × cos δ); sunrise = solar noon − H, sunset = solar noon + H (H converted at 15° per hour).
The sunrise equation
For each date the calculator finds the sun’s declination δ and the time of solar noon from the NOAA and Meeus low-precision solar terms, which include the equation of time. It then solves for the hour angle H at which the sun reaches a given altitude at latitude φ. Sunrise and sunset sit symmetrically on either side of solar noon, so day length is twice H. The same equation with an altitude of −6° gives civil dawn and civil dusk, when the centre of the sun is 6° below the horizon and there is usually enough light for outdoor activity without artificial lighting.
Why −0.833° rather than zero
Sunrise and sunset are defined as the moment the upper edge of the sun touches the horizon. Two corrections move that moment away from the geometric centre of the sun crossing 0°. Atmospheric refraction bends sunlight over the horizon by about 34 arcminutes, and the sun’s apparent radius is about 16 arcminutes. Together they make 50 arcminutes, or 0.833°. Using this value, sunrise comes a few minutes earlier and sunset a few minutes later than the geometric crossing, which matches the times published by almanacs and weather services.
Worked examples
London near the June solstice
For London (51.51° N, 0.13° W) on June 21, 2026, sunrise is about 04:43 BST and sunset about 21:21 BST, giving roughly 16 h 38 min between them. Civil dawn is near 03:55 and civil dusk near 22:09, so the sky is light for more than 18 hours. The change from June 20 is only a few seconds, because day length changes slowest near a solstice and fastest near an equinox.
Chicago in late October
For Chicago (41.85° N, 87.65° W) on October 29, 2026, sunrise is about 7:19 AM CDT and sunset about 5:49 PM CDT, for a day length of about 10 h 30 min. The day is roughly two and a half minutes shorter than October 28. Solar noon falls near 12:34 PM CDT, more than half an hour after 12:00 on the clock. The reasons are explained in the solar noon section below.
Polar night in Tromsø
Tromsø, Norway, lies at 69.65° N, north of the Arctic Circle. On December 21, 2026 the sun stays below the horizon all day, so the calculator reports polar night instead of sunrise and sunset. Civil twilight still occurs: civil dawn is close to 09:31 and civil dusk close to 13:53 CET, when the sun comes within 6° of the horizon around solar noon. Under this method the polar night lasts from late November to mid-January, and in summer the reverse happens, with the sun above the horizon continuously from roughly mid-May to late July.
Edge cases and practical checks
Accuracy limits
Between latitudes 65° N and 65° S the calculated times are normally within about one minute of more detailed astronomical calculations. Closer to the poles the sun crosses the horizon at a shallow angle, so a small error in altitude becomes a large error in time, and the first or last sunrise of a season can be off by more than a day. Refraction also varies with air temperature and pressure, which the calculator treats as standard. Treat any result within a minute or two as approximate.
Location, elevation and terrain
The calculator uses the coordinates of the city centre from the GeoNames list and assumes an observer at sea level with a flat horizon. In a large city, sunrise on the eastern edge can be a minute or more earlier than on the western edge. An observer on a mountain or a high floor sees the sun earlier and longer, while hills, buildings or a valley can hide it. Cloud and weather are not included; the times describe where the sun is, not whether it is visible.
Frequently asked questions
Why is solar noon not at 12:00?
Solar noon is the moment the sun crosses the local meridian and is highest in the sky. Clock noon follows the time zone, which covers a wide band of longitude, so most places are east or west of the zone’s reference line. Daylight saving time moves the clock an hour further from the sun. The equation of time adds or subtracts up to about 16 minutes through the year because Earth’s orbit is elliptical and its axis is tilted. In Chicago in late October all three effects combine to put solar noon near 12:34 PM.
What is civil twilight?
Civil twilight is the period when the centre of the sun is between 0° and 6° below the horizon. Civil dawn marks its start in the morning and civil dusk marks its end in the evening. During this time the sky is usually bright enough to see outdoors. Nautical and astronomical twilight, at 12° and 18° below the horizon, are darker stages and are not shown by this calculator.
Why is the earliest sunset not on the shortest day?
Day length is shortest at the December solstice in the northern hemisphere, but the equation of time shifts solar noon later through December. Sunrise and sunset both move later as a result, so the earliest sunset comes a week or two before the solstice and the latest sunrise a week or two after it. The monthly table shows this shift directly.
What does polar day or polar night mean?
At high latitudes the sun’s declination can keep it entirely above the horizon for a full day, which is polar day or midnight sun, or entirely below it, which is polar night. The equation has no solution on those dates, so there is no sunrise or sunset to report. Day length is shown as 24 hours or zero, and solar noon is still given.
Does the calculator account for daylight saving time?
Yes. Each time is converted to the city’s time zone using the rules in effect on the selected date. In the month that contains a clock change, the table shows sunrise and sunset jumping by about an hour on the day of the change, even though the sun’s position changes only slightly.
Why does my weather app show a slightly different time?
Other sources may use different coordinates for the city, a different algorithm, a different refraction value, or round seconds differently. A difference of a minute is normal. Larger differences usually mean the two sources are using different locations or different time zones.
Can I calculate times for an exact address or coordinates?
No. The calculator works from the city list, and each city is represented by its centre coordinates. For a place between two listed cities, choose the nearest one and expect a difference of up to a few minutes, mainly from the change in longitude: each degree of longitude shifts the times by about four minutes.