Travel

Sunrise and Sunset Calculator (Day Length and Twilight)

Enter a date, your coordinates and your UTC offset to get the sunrise and sunset times.

Your numbers

Include daylight saving time if it applies on that date

Your results

Sunrise
Sunrise
—
Sunset
—
Solar noon
—
Day length
—
Civil dawn
—
Civil dusk
—
Day length (hours)
—

Sunrise and Sunset Calculator (Day Length and Twilight) by TheCalcTools

How the Sunrise and Sunset Calculator (Day Length and Twilight) works

The calculation finds the Sun’s position for the date (its declination and the equation of time) and then the hour angle at which the Sun’s centre is 0.833° below the horizon. That allows for the Sun’s radius and the bending of light by the atmosphere.

Solar noon is when the Sun is highest. Sunrise and sunset are the same time before and after it. Civil twilight starts and ends when the Sun is 6° below the horizon, when there is still enough light for most outdoor activities.

Results are usually within a minute or two of observatory tables. Mountains, buildings and unusual weather can shift what you see.

The formula

cos ω₀ = (sin(−0.833°) − sin φ sin δ) ÷ (cos φ cos δ)Sunrise = solar noon − ω₀ × 4 min/°; sunset = solar noon + ω₀ × 4 min/°

Worked example

Using the default values shown in the calculator:

Date2026-10-17
Latitude (north positive)33.6844
Longitude (east positive)73.0479
UTC offset of your local time (hours)5
  1. Islamabad (33.68° N, 73.05° E) on 17 October 2026 at UTC+5: sunrise 6:14 AM, sunset 5:33 PM.
  2. Day length 11 h 19 min; solar noon 11:53 AM.

Result:

Sunrise6:14 AM
Sunset5:33 PM
Solar noon11:53 AM
Day length11 h 19 min
Civil dawn5:48 AM
Civil dusk5:58 PM
Day length (hours)11.32

Frequently asked questions

Why is the earliest sunset not on the shortest day?

The equation of time shifts solar noon through the year, so in the northern hemisphere the earliest sunset comes a couple of weeks before the December solstice.

What UTC offset should I enter?

Your local clock offset on that date: Pakistan is +5, India +5.5, UK +0 in winter and +1 in summer, New York −5 in winter and −4 in summer.

Sources and further reading

More in Travel · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.