How to use it
- Choose the Date you want the times for.
- Type the Latitude and the Longitude of the place, in decimal degrees. A map or a phone's location settings show them.
- Type the Time zone, such as Europe/Istanbul, so the clock times match the place's clock on that date.
- Read Hours of daylight first, then Sunrise and Sunset. The table shows the same figures for the next seven days.
How the sunrise and sunset are found
The Sun rises when the centre of its disc climbs through a fixed altitude, and sets when it falls through the same altitude. The calculator takes that altitude as 0.833 degrees below the geometric horizon, which is the figure NOAA's solar calculator uses for the refraction of the air at sunrise and sunset.
The position of the Sun for each minute is computed with astronomy-engine, an open-source library. The calculator then reads the times of the two crossings within the calendar day of the place's time zone.
Sunrise: the Sun's centre rises through −0.833°
Sunset: the Sun's centre sets through −0.833°
Hours of daylight: the time between them on the same calendar day
At the equator on the equinox, where the Sun's declination is near zero, the day is a little over 12 hours.
What this calculator does not include
- The height of hills, buildings and trees around the place. The times assume a flat horizon at sea level.
- Weather, haze and the light before sunrise or after sunset. For the light before sunrise and after sunset, see the golden hour calculator.
- Local rules that change the clock, such as a zone with a daylight saving time that was changed by its government. The zone name is read from the browser's own time zone data.
Worked example: Istanbul, 21 June 2026
Istanbul is at 41.01° N, 28.95° E, in the time zone Europe/Istanbul. On 21 June 2026 the Sun rises at 05:32 and sets at 20:40 on the local clock.
From 05:32 to 20:40 is 15 hours 8 minutes, or 908 minutes. Over the next seven days the day changes by about a minute, because the days are longest near midsummer and change slowly then.
| 21 June 2026 | |
|---|---|
| Sunrise | 05:32 |
| Sunset | 20:40 |
| Hours of daylight | 15 hours 8 minutes |
Frequently asked questions
How is the number of daylight hours worked out?
The calculator finds the moments the Sun's centre crosses 0.833 degrees below the horizon on that calendar day, and adds up the time it is above that altitude. It gives the result in hours and minutes.
Why do the times differ from my weather app?
Weather apps may use a different allowance for refraction, the height of the observer above sea level, or a local horizon with hills. This calculator uses the NOAA refraction figure and a flat horizon at sea level, so a difference of a minute or two is normal.
What happens in the polar summer and winter?
Far north or south, the Sun can stay above the horizon all day, or stay below it. The calculator then shows 24 hours or 0 hours, and a dash for the sunrise or the sunset that does not happen.
Are the clock times in local time with daylight saving?
Yes. Each time is written on the clock of the time zone you type, and that zone's daylight saving time is applied for the date you choose. A day with a clock change can therefore last a little more or less than 24 hours on the clock.
Do I need my exact coordinates?
No. A place within a few kilometres gives the same sunrise and sunset to the minute. Only a place far to the east or west, within the same zone, shifts the clock times noticeably.
Is my location sent anywhere when I use it?
No. The calculation runs in your browser, and the coordinates you type are not stored or sent to us.
Sources
- NOAA Global Monitoring Laboratory: Solar calculator, calculation details (0.833 degrees of refraction for sunrise and sunset)
- astronomy-engine, the open-source astronomy library (MIT) that finds the crossings of the Sun's altitude
Figures and text last checked on Thursday, November 12, 2026.