FreeToGenerate.com

Computed in your browser — no location is sent anywhere and nothing is looked up.

Try

Latitude is positive north, longitude positive east. Everything is computed in your browser — no location is sent anywhere, and nothing is looked up.

Calculating…

How accurate is this?

Within about a minute up to 72 degrees of latitude, and less reliable beyond that, which is what NOAA states for the equations used here. Two physical effects set that floor: the atmosphere bends light over the horizon by an amount that varies with pressure and temperature, and your elevation is not modelled — from a mountain the sun rises earlier than from the valley below it.

Also available in: Español · Português · Français · العربية

Sunrise and Sunset Calculator

Sunrise, sunset, solar noon and day length anywhere on Earth — including the places where there is no sunrise to give.

What does a sunrise and sunset calculator do?

It works out when the sun crosses the horizon at a particular place on a particular day. Give it a latitude, a longitude and a date, and it returns sunrise, sunset, solar noon and the length of the day. This one does the arithmetic in your browser: your coordinates are never sent anywhere, and there is no table being consulted.

That last point is worth dwelling on, because it is unusual for a tool of this kind. Sunrise is not looked up — it is computed from the geometry of the Earth's orbit and tilt, using the equations NOAA publishes for its own solar calculator. There is no dataset to go stale, no service to depend on and no version of this page that stops working when someone else's API changes. The sun's position for a given instant follows from astronomy that was settled long before the web existed.

Solar noon is the piece most people have never seen, and it explains a lot. It is the moment the sun is highest, and it is almost never at 12:00 — partly because time zones are wide political stripes rather than meridians, and partly because the Earth's orbit is an ellipse, which makes the sun run up to about sixteen minutes ahead of clock time in November and fourteen behind in February. That swing is called the equation of time.

How to use the calculator

  1. Set the place. Type a latitude and longitude, or press one of the preset cities. Latitude is positive north of the equator, longitude positive east of Greenwich — a common source of quietly wrong answers is a longitude entered with the wrong sign.
  2. Pick a date. It starts on today. Change it to any date you like; the calculation is the same for a day in 1750 as for one in 2150.
  3. Read the times. Everything is shown in UTC and in your own time zone side by side, along with the length of the day. If the sun neither rises nor sets that day, you get that answer instead — see below.

Where there is no sunrise to give

Above the Arctic Circle in midsummer the sun does not set, and in midwinter it does not rise. The same happens south of the Antarctic Circle with the seasons reversed. These are not edge cases in a programming sense — they are ordinary facts of life for millions of people, and any calculator that covers the whole Earth has to handle them.

Most do not. The reason is instructive: the equation that produces the time of sunrise ends in an arccosine, and at those latitudes the value handed to it falls outside the range an arccosine accepts. What comes back is not a number. An implementation that does not check either prints something broken or, worse, clamps the value and returns a plausible-looking time for an event that does not occur. Press the Tromsø button above and change the date between June and December to see both cases stated plainly rather than papered over.

This tool answers with the midnight sun or the polar night by name, and still gives you solar noon, because the sun does reach its highest point even on a day it never rises. During polar night that height is below the horizon — which is why those places are not pitch dark at midday. Twilight reaches considerably further than the sun itself.

How accurate is it, honestly

Within about a minute for latitudes up to 72 degrees, and less reliable beyond that. That is not our estimate — it is what NOAA states for these equations, and it is worth understanding why a published table cannot promise much better either.

The first reason is refraction. The atmosphere bends light coming from just over the horizon, so the sun becomes visible before it geometrically rises and stays visible after it has geometrically set. The standard correction assumes an average atmosphere, and the true amount varies with pressure and temperature — on a very cold, still morning the sun can appear several minutes early. Every calculator, ours included, uses the same convention: sunrise is the moment the upper edge of the sun touches the horizon, with the correction folded into a fixed number.

The second is elevation, which is not modelled at all. From the top of a mountain the sun rises measurably earlier than from the valley floor, and correcting for it properly needs a profile of the horizon in every direction rather than a single figure. If you are somewhere with hills to the east, the sun will clear them some time after the moment given here, and no amount of astronomy can tell you when.

One consequence of refraction is visible in the results and surprises people: at an equinox the day is not exactly twelve hours. It is a few minutes longer, and the excess grows with latitude — about seventeen minutes at 60 degrees — because the sun crosses the horizon at a shallower angle there and spends longer inside the bent-light zone. Equal day and night actually happens a few days before the March equinox and a few days after the September one.

Why is it free?

The whole calculation is a few dozen lines of arithmetic running in your browser. Your coordinates are not uploaded, nothing is logged, and there is no account to make — so there is nothing to charge for, and no reason for us to know where you are.

No sign-up, no limits, and no watermark on anything you copy out.