Skip to main content
ToolsHub

Sunrise & Sunset Calculator

Enter a date and coordinates — or use your location — to get sunrise, sunset and total daylight, calculated with the standard sunrise equation in your browser.

Updated

Files never leave your browser

No result yet

Enter a date and location, then calculate to see sunrise and sunset times.

How to use Sunrise & Sunset Calculator

The Sunrise & Sunset Calculator works out the times the sun rises and sets for any date and any place on Earth, given the location’s latitude and longitude. It also reports the total length of daylight, and it correctly handles the extremes near the poles, where on some dates the sun never rises or never sets. The calculation uses the standard sunrise equation — the same astronomy that powers weather apps — and runs entirely in your browser. You can type coordinates directly or let the tool read your current position, making it quick to check sun times for home, a trip, or a photography shoot.

  1. Choose the date you want sun times for.
  2. Enter the latitude and longitude, or use your location.
  3. Select calculate.
  4. Read sunrise, sunset and total daylight.
  5. Change the date or coordinates to compare.

Your data never leaves your device — 100% private processing.

How sun times are calculated

Sunrise and sunset depend on the sun’s position relative to the horizon, which in turn depends on your latitude, your longitude, and the date. The standard sunrise equation models the Earth’s orbit and tilt to find the sun’s declination for the day, then solves for the "hour angle" at which the sun’s centre sits about 0.83 degrees below the true horizon — the small offset that accounts for atmospheric refraction bending light and the sun’s own disc size. From that it derives the solar noon for your longitude and the equal times before and after it when the sun crosses the horizon. The method is accurate to roughly a minute, which is more than enough for planning; the small residual error comes from local terrain, elevation and day-to-day atmospheric variation that no general formula can capture.

What affects the times
FactorEffect
LatitudeBigger seasonal swing in day length farther from the equator
LongitudeShifts solar noon, and so sunrise and sunset, east–west
DateChanges the sun’s declination and day length
RefractionAdds a few minutes of apparent daylight

Timezones and the polar extremes

Two practical points make the results easier to use. First, timezones: the underlying calculation produces times in UTC, and this tool converts them to your device’s local timezone for display. That is exactly right when you are calculating for a place in your own timezone, but if you look up a location elsewhere, remember to apply the offset between your device and that place. Second, the poles: as latitude increases, summer days lengthen and winter days shorten until, beyond the Arctic and Antarctic circles, there are dates when the sun simply does not cross the horizon at all. Rather than show a meaningless time, the calculator detects these cases and reports "polar day" (the sun never sets) or "polar night" (the sun never rises), so the output stays honest at every latitude.

Worked examples

London midsummer

Inputs: 51.51, −0.13 · 21 Jun

Result: Long daylight, early sunrise

Arctic winter

Inputs: 78°N · December

Result: Polar night — sun does not rise

Glossary

Latitude
How far north or south a place is, from −90° to +90°.
Longitude
How far east or west a place is, from −180° to +180°.
Solar noon
The moment the sun is highest in the sky for a given longitude.
Refraction
Bending of sunlight by the atmosphere that lengthens apparent daylight.
Polar night
A date when the sun never rises above the horizon.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Date & Time

Explore all Date & Time.