Toolvito

Works on this device

Day Length Calculator

Find how long the sun is up on a date at a place: the times of sunrise and sunset, the length of the day, and the times and lengths of twilight. You can also see the length of the day for a whole year.

Enter your values

Sunrise, sunset and the length of the day, with the times and lengths of civil, nautical and astronomical twilight.

Your values

In decimal degrees: north is positive, south is negative. The example is Berlin.

In decimal degrees: east of Greenwich is positive, west is negative. It moves the clock times, not the length of the day.

How many hours the clock is ahead of UTC: 2 for UTC+2, -5 for UTC-5, 5.5 for UTC+5:30. In summer time, count the extra hour.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose Day length for a date and place or Day length through a year.
  2. Type the latitude and longitude in decimal degrees (north and east are positive) and the date or the year.
  3. Type the time zone as hours from UTC, for example 2 for UTC+2 or -5 for UTC-5. In summer time, count the extra hour.
  4. Choose Calculate. The tables show the times of dawn and dusk and the length of each kind of twilight.

How the day is measured

  • Sunrise and sunset: the moments when the centre of the sun is 0.833° below a level horizon. Then the top edge of the sun just shows, because the air lifts the sun by about 34′ at the horizon and the sun is about 16′ in radius. NOAA and the US Naval Observatory use the same rule.
  • Day length = sunset − sunrise. It is the time the sun stays above that line, counted in the 24 hours from the solar midnight before the solar noon of the date to the solar midnight after it.
  • Twilight: civil twilight lasts while the centre of the sun is between 0.833° and 6° below the horizon, nautical twilight from 6° to 12°, and astronomical twilight from 12° to 18°. Dawn is the start in the morning, dusk the end in the evening.
  • Polar day and polar night: near the poles the sun can stay above the line for all 24 hours, or below it. The tool says so in place of a time.
  • Sun position: the solar equations of the NOAA Solar Calculator, which NOAA says are based on Astronomical Algorithms by Jean Meeus.

Worked example

Berlin is at about 52.52° N and 13.405° E. On 21 June 2026 its clock is at UTC+2. The sun rises at 04:43:05 and sets at 21:33:18, so the day is 16 h 50 min 13 s long, 2 seconds longer than the day before.

Civil twilight lasts 50 min 15 s in the morning and in the evening. The sun does not go down to 18° below the horizon, so there is no fully dark night in Berlin at midsummer.

The shortest day of 2026 in Berlin is on 21 December: 7 h 39 min 03 s.

Limits you should know

  • The times are for a level, clear horizon at sea level. Hills, trees and buildings hide a low sun, and a high place sees it earlier.
  • The air near the horizon bends light by different amounts from day to day, so the real times of sunrise and sunset can differ by a minute or more.
  • The time zone is the one you type. The tool does not know the summer time rules of your country.
  • The years 1901 to 2099 can be used. Within a fraction of a degree of the poles, where the sun moves almost level with the horizon, the times are less certain.
  • For the sun angle at a time, use the Solar Elevation Calculator. For daylight through the year in more detail, use the Daylight Availability Calculator, and for the dark sky after dusk the Astronomical Twilight Calculator.

Related tools