Intermediate

Sunset Calculator — Sunset Time by Location & Date

Enter a latitude, longitude, date and your UTC offset to calculate the precise local sunset time, solar noon, sunrise and total daylight duration — including polar day and polar night detection.

°

Positive = North, negative = South

°

Positive = East, negative = West

Month

h

Your local UTC offset (e.g. UTC+2 → enter 2)
Sunset time
9.97local

Sunset at 09:58 local time

Sunrise
17:47
Solar noon
01:52
Sunset
09:58
Daylight duration
-8h -49min
Solar declination
23.44°
Night duration
31h 49min
Clock showing sunset time
17:4709:58-8h -49minDaylight window — from sunrise to sunset
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Sunset time = Solar noon + hour angle/15°. The hour angle ω₀ = arccos[(sin(−0.833°) − sin φ · sin δ) / (cos φ · cos δ)], where φ is latitude and δ is solar declination. Declination varies ±23.44° with the seasons. Days are longest near the summer solstice; beyond the polar circles the Sun may not set at all.

Formula
Sunset = Solar noon + ω₀/15° • Hour angle ω₀ = arccos[(sin(−0.833°) − sin φ · sin δ) / (cos φ · cos δ)]
How this is calculated

Sunset is the moment the upper limb of the Sun's disc touches the horizon as it descends in the west. The standard definition uses −0.833° below the geometric horizon, accounting for atmospheric refraction (~0.583°) that bends sunlight slightly upward and for the Sun's apparent radius (~0.25°). This makes the visible sun set about 2 minutes later than a simple geometric calculation would suggest.

The calculator uses the NOAA simplified solar algorithm: it calculates the Julian date offset from J2000.0, derives the Sun's ecliptic longitude from the mean anomaly and equation of the centre, converts to solar declination δ, and finally solves the horizon equation for the hour angle ω₀ — the angular distance (converted to time at 15° per hour) from solar noon to sunset. Adding ω₀/15 to solar noon gives the UTC sunset time, which is then converted to local time using your UTC offset.

Longer days occur in summer because the higher declination δ pushes the hour angle ω₀ wider. Near the Arctic and Antarctic circles (±66.56°) the Sun grazes the horizon at the solstices; beyond the polar circles the equation has no solution, producing polar day (midnight sun) or polar night.

Frequently asked questions

Sunset is when the Sun's disc disappears below the horizon. Civil twilight ends when the centre is 6° below; nautical twilight at 12°; astronomical twilight at 18°. This calculator gives the sunset moment only — civil twilight adds roughly 20–30 minutes of usable light after sunset.

Both cities use Central European Time (UTC+1 standard / UTC+2 summer), but Madrid is ~3.7° west of London. Solar time is earlier in the west: for every 1° west the sun rises and sets about 4 minutes later in solar time, but most of Spain uses Central European rather than Atlantic time for political reasons.

No — DST is not applied automatically because it changes by country and even by region. If your area observes DST, add 1 extra hour to the UTC offset field (e.g. use UTC+2 instead of UTC+1 during summer DST).

Also known as

what time does the sun set
sunset time calculator by location
dusk time by latitude longitude
solar sunset hour calculator
when does the sun go down
sunset time date city
daylight hours calculator

APA

TG we-Calculate Editorial Team. (2026). Sunset Calculator — Sunset Time by Location & Date [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/sunset-calculator

Chicago

TG we-Calculate Editorial Team. "Sunset Calculator — Sunset Time by Location & Date." TG we-Calculate. 2026. https://we-calculate.com/calculator/sunset-calculator.

IEEE

TG we-Calculate Editorial Team, "Sunset Calculator — Sunset Time by Location & Date," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/sunset-calculator

BibTeX

@misc{wecalculate_sunset_calculator, title = {Sunset Calculator — Sunset Time by Location & Date}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/sunset-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?