Day Length, Sunrise and Sunset Calculator

Choose a date and type the latitude, the longitude and the time zone of the place. You get the sunrise, the sunset and the hours of daylight, and a table of the next seven days.

Free Runs in your browser Checked Thursday, November 12, 2026

The day you want the times for.

North is positive, for example 41.01 for Istanbul. Range: -90 to 90.

East is positive, for example 28.95 for Istanbul. Range: -180 to 180.

An IANA name such as Europe/Istanbul or America/New_York. The clock times are written in this zone, with its daylight saving time on the date you choose.

Result

Hours of daylight — The time the Sun is above the horizon on that calendar day.
Sunrise — The first sunrise of the day, in the time zone you typed.
Sunset — The last sunset of the day, in the time zone you typed.
Place and time zone — The coordinates and the time zone the clock times use.
The next seven days

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. Choose the Date you want the times for.
  2. Type the Latitude and the Longitude of the place, in decimal degrees. A map or a phone's location settings show them.
  3. Type the Time zone, such as Europe/Istanbul, so the clock times match the place's clock on that date.
  4. 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

Figures and text last checked on Thursday, November 12, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.