PK Systems PK Systems
Date & time

Sunrise & Sunset Calculator

Compute sunrise, sunset, solar noon and the three twilight phases for any latitude, longitude and date. Everything runs in your browser.

Sunrise & Sunset Calculator

Solar events

Sunrise
--:--
Solar noon
--:--
Sunset
--:--
Day length
Civil dawn
Civil dusk
Nautical dawn
Nautical dusk
Astronomical dawn
Astronomical dusk
Time zone

What this calculator returns

It computes the seven moments of the solar day for the coordinates you enter: sunrise (upper limb crosses the horizon), solar noon (sun's highest point), sunset, and the start/end of civil, nautical and astronomical twilight. All times are shown in your device's local time zone. Day length is the interval between sunrise and sunset.

How to use it

Enter your latitude and longitude in decimal degrees (north and east are positive; south and west are negative — for example, Sydney is roughly -33.87, 151.21). Pick a date. The result panel updates instantly. The Use my location button asks the browser for permission and fills the coordinates from GPS or Wi-Fi positioning — coordinates are never sent off your device.

How the times are calculated

The calculator uses the standard solar position model published by the U.S. National Oceanic and Atmospheric Administration. It computes the Julian date for your local civil date, derives the Sun's mean longitude, mean anomaly, equation of centre and equation of time, and from those obtains the solar declination. The hour angle for each event is then arccos((sin(h₀) − sin(φ)·sin(δ)) ÷ (cos(φ)·cos(δ))), where h₀ is the geometric altitude of the Sun's centre at the event (−0.833° for sunrise/sunset to account for atmospheric refraction and the Sun's apparent radius, −6° for civil twilight, −12° for nautical, −18° for astronomical). Solar noon plus or minus the hour angle (in time units) gives the moment of the event in UT, which is then displayed in your local zone.

What each twilight phase means

Civil twilight (Sun 0° to 6° below horizon): bright enough to read outside without artificial light; the brightest planets become visible. Nautical twilight (6° to 12°): the horizon is still distinguishable at sea, useful for celestial navigation. Astronomical twilight (12° to 18°): the sky is dark enough that 6th-magnitude stars become visible, but a faint glow may still affect deep-sky photography. After astronomical dusk, true night begins.

Frequently asked questions

How accurate are these times?
Within about ±1 minute for typical mid-latitude locations and dates. The model assumes a flat horizon and standard atmospheric refraction (0.566°). Mountains, tall buildings, unusual atmospheric conditions, or locations very close to the poles can shift the actual observed sunrise/sunset by several minutes.
Why does the result say 'polar day' or 'polar night'?
Inside the polar circles (above 66.5° or below −66.5° latitude), the Sun can stay below or above the horizon for the entire day during certain seasons. When that happens for the requested event, no sunrise or sunset exists for that date — the calculator labels the result accordingly.
What latitude and longitude format does it accept?
Decimal degrees only, with a sign convention: north and east are positive, south and west are negative. So Tokyo is 35.6762, 139.6503, Buenos Aires is -34.6037, -58.3816. If your source uses degrees-minutes-seconds, convert first: D + M/60 + S/3600.
Does the date matter or is it always 'today'?
It matters a lot — sunrise can shift by more than two hours over a year at mid-latitudes. The calculator works for any past or future date the browser can represent (roughly 1900 to 2100 with no measurable accuracy loss).
Is geolocation private?
Yes. The browser asks you for permission, then hands the coordinates directly to the calculator running on this page. Nothing leaves your device — no network request fires when you click Use my location.
Why does the result use my computer's time zone?
The underlying instants are absolute (a moment in time, the same everywhere on Earth). To make them readable, the page formats each moment in the time zone configured on your device. If you want a different city's local time, change your system clock or look up the offset between zones.