Advertisement
Advertisement
EVERYDAY

Sunrise Sunset Calculator — solar times for any place and date

Compute sunrise, sunset, solar noon and day length anywhere on Earth from latitude, longitude and date, using NOAA's solar position algorithm.

Defaults to today. Any date from 1901 to 2099 is well inside the algorithm's usable range.
Decimal degrees. North and east are positive, south and west negative. The default is New York City.
Enter the offset actually observed on the date, including summer time. New York is −5 in winter and −4 in summer. Half-hour zones use 5.5, 9.5 and so on.
Presets carry a typical summer offset. Change the offset field if your date falls in the other half of the year.
Daylight on this date
 
Sunrise
Sunset
Solar noon
Sun's altitude at noon
Tip: solar noon is rarely 12:00. It drifts with your position inside the time zone and with the equation of time, which swings the sun roughly 16 minutes early in early November and 14 minutes late in mid-February.
Advertisement

This sunrise sunset calculator computes solar times from first principles rather than looking them up. It implements the solar position algorithm NOAA publishes for its own solar calculator, derived from Jean Meeus's Astronomical Algorithms, so it works for any latitude, any longitude and any date without a table or a network request.

Arb Digital publishes it because a lookup table can only answer for places and dates someone thought to include, and the underlying astronomy is not that complicated once written down. The page returns sunrise, sunset, solar noon, day length and the sun's maximum altitude, and it tells you honestly what the numbers cannot account for.

What This Sunrise Sunset Calculator Does

It computes the sun's declination and the equation of time for the moment of local solar noon on your date, then solves for the hour angle at which the sun's centre sits 0.833° below the geometric horizon. That offset is the standard convention: about 0.267° for the sun's apparent radius, so the event is timed to the upper limb rather than the centre, plus about 0.566° for average atmospheric refraction near the horizon.

It is an astronomy tool, not a calendar tool. Our day of year calculator and date difference calculator do pure date arithmetic with no reference to the sun's position, and the add days to date calculator shifts a date by an interval. This page is the one that needs your coordinates, because the answer changes as you move.

How to Use It

  1. Set the date. It defaults to today. Solar times move fastest around the equinoxes, so a day either side can differ by two or three minutes at mid-latitudes.
  2. Enter coordinates in decimal degrees. North and east positive, south and west negative. A degree of latitude is about 111 km, so four decimal places is far finer than the algorithm's own accuracy.
  3. Set the UTC offset that applies on that date. This is the single most common source of a one-hour error. The tool has no time-zone database and cannot know whether summer time was in force.
  4. Pick a clock format and read the results. Every time shown is local clock time at the offset you entered.
  5. Check the polar message if you are above 66.5°. Near the poles the sun may not rise or set at all, and the tool says which rather than returning a broken time.

The Algorithm and How It's Calculated

The chain runs from the calendar date to an hour angle. First the date becomes a Julian Day number and then a Julian Century, T, measured from J2000.0. From T the algorithm computes the sun's geometric mean longitude and mean anomaly, the eccentricity of Earth's orbit, and the equation of centre — the correction for the orbit being an ellipse rather than a circle. Those combine into the sun's apparent ecliptic longitude, which with the corrected obliquity of the ecliptic gives the declination, the sun's angular distance north or south of the celestial equator.

The second output is the equation of time, the gap in minutes between apparent solar time and mean solar time. It comes from the same series, and it is what makes solar noon wander through the year. Solar noon in local clock time is then (720 − 4 × longitude − equation of time + 60 × UTC offset) ÷ 1440 of a day, where the factor of four is the four minutes the Earth takes to turn one degree.

The last step is the sunrise hour angle H, from cos H = cos(90.833°) ÷ (cos φ × cos δ) − tan φ × tan δ, with φ the latitude and δ the declination. Sunrise is solar noon minus 4H minutes and sunset is solar noon plus 4H minutes, so day length is simply 8H minutes. Notice that if the right-hand side falls outside −1 to +1 there is no solution, and that is not an error — it is the mathematics telling you the sun never crosses the horizon that day. The full derivation and the constants are set out in NOAA's Solar Calculation Details.

Advertisement

How Accurate This Is, and What It Ignores

NOAA states the accuracy of these equations as within about one minute for locations between 72° north and 72° south, and within about ten minutes outside that band. The degradation at high latitude is geometric, not a defect in the code: near the poles the sun approaches the horizon at a very shallow angle, so a tiny error in altitude becomes a large error in time.

Three things are deliberately not modelled. The first is variation in refraction. The 0.833° figure assumes average atmospheric conditions; unusual temperature and pressure can shift the true horizon crossing by a minute or more, and strong temperature inversions can produce far larger anomalies at high latitudes. The second is terrain and elevation. The calculation assumes a flat, unobstructed sea-level horizon. A mountain to your east delays visible sunrise, and standing on high ground brings it forward — roughly a minute earlier for every 1.5 km of elevation at mid-latitudes, more at low latitudes. The third is your own horizon: buildings and trees are not in the model.

None of this makes the output vague. It means the result is the astronomical event at an ideal horizon, which is exactly what a published sunrise time is. If you need the moment the sun clears the ridge behind your house, this figure is the starting point rather than the answer. NOAA also notes on its own Solar Calculator that the tool is no longer actively maintained and that its results cannot be certified for legal purposes, which applies equally here.

Why Solar Noon Is Almost Never Twelve O'Clock

Two independent effects push it around. The first is your position within your time zone. A zone is nominally 15° wide but its clock is set to a single meridian, so every degree you sit east of that meridian moves your solar noon four minutes earlier and every degree west moves it four minutes later. In a wide zone the two ends can be over an hour apart in true solar time while sharing a clock.

The second is the equation of time, which is the sum of two annual cycles. The Earth's orbit is elliptical, so it travels faster near perihelion in January than near aphelion in July, and the sun therefore runs ahead of or behind the uniform clock. On top of that, the sun moves along the ecliptic rather than the equator, so its eastward progress projects unevenly onto the clock. Together they swing apparent solar time by roughly −14 minutes in mid-February and +16 minutes in early November, crossing zero four times a year. Plot the sun's position at the same clock time every day and the two cycles trace a figure-of-eight, the analemma.

This is why "the earliest sunset" and "the shortest day" fall on different dates in the northern hemisphere. The earliest sunset arrives in early December, the shortest day at the solstice around 21 December, and the latest sunrise in early January. Day length is symmetrical about the solstice; the clock times of the two ends are not, because the equation of time is shifting them both in the same direction.

Polar Day, Polar Night, and What the Tool Says Instead

Above 66.5° latitude there are dates when the equation for the hour angle has no solution because the sun stays entirely above or entirely below the horizon for the whole 24 hours. A calculator that ignores this returns a blank or an error; this one reports which case you are in and why.

Which case it is depends on the sign. If the required cosine falls below −1, the sun never reaches the horizon going down and you have polar day — the midnight sun. If it rises above +1, the sun never reaches the horizon coming up and you have polar night. The refraction allowance shifts both boundaries slightly equatorward of the Arctic and Antarctic circles, which is why the midnight sun is visible a little south of 66.5°N and why polar night begins a little later than the pure geometry suggests. Try the Svalbard preset in June and again in December to see both.

Polar night is not total darkness. Civil, nautical and astronomical twilight continue to divide the day even when the sun's disc stays down, and at latitudes just inside the circle a polar-night noon is closer to a long dim dusk than to night. Those twilight boundaries are separate calculations at 6°, 12° and 18° below the horizon, and this tool reports the 0.833° sunrise and sunset events only.

Where These Numbers Get Used

Day length and the sun's noon altitude between them drive most practical solar questions. The altitude figure in the grid is the maximum elevation the sun reaches, computed as 90° minus the difference between your latitude and the sun's declination, and it is what decides how much energy a fixed surface intercepts and what shadow length a given object casts. Pair it with the solar panel calculator when you are sizing an array, since panel tilt is chosen against exactly this angle.

Photographers use the same outputs backwards: the golden hour sits around sunrise and sunset, and its length depends on how steeply the sun crosses the horizon, which is a function of latitude and season rather than a fixed sixty minutes. Anyone comparing solar times between two places will also want the great circle distance calculator to see how far apart they really are, and the angle converter if the coordinates arrive in degrees, minutes and seconds rather than decimal. Day length is the strongest environmental cue for circadian timing, which is where the sleep cycle calculator picks up.

Want your marketing built on real numbers rather than approximations?

Arb Digital works the way this page does — implement the actual model, then say plainly what it does and does not account for.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Using the wrong UTC offset — entering the winter offset for a summer date shifts every result by exactly one hour, and the answer still looks entirely plausible.
  • Getting the longitude sign backwards — west is negative here. New York is −74, not +74, and the sign error moves solar noon by nearly ten hours.
  • Expecting the visible horizon — these are ideal-horizon times. Hills, buildings and your own elevation all move the sun you can actually see.
  • Assuming the shortest day has the earliest sunset — it does not, because the equation of time shifts the two ends of the day independently.
  • Trusting sub-minute precision — the underlying accuracy is about a minute in the temperate zone and about ten minutes near the poles, so seconds are meaningless.

Related Free Tools From Arb Digital

Find the ordinal date with the day of year calculator, count between two dates with the date difference calculator, shift a date with the add days to date calculator, measure between two coordinate pairs with the great circle distance calculator, convert coordinate formats with the angle converter, or size an array against the sun's altitude with the solar panel calculator. The full free online tools hub lists everything we publish.

Frequently Asked Questions

How does this calculator work without looking anything up?

It implements the solar position equations NOAA publishes, which derive the sun's declination and the equation of time from the date alone. Sunrise and sunset then come from solving for the hour angle at which the sun sits 0.833 degrees below the horizon.

How accurate are the times?

NOAA gives the accuracy of these equations as within about one minute between 72 degrees north and 72 degrees south, and within about ten minutes outside that band, where the sun crosses the horizon at a very shallow angle.

Why 0.833 degrees below the horizon?

It combines two corrections: roughly 0.267 degrees for the sun's apparent radius, so the event is timed to the upper edge of the disc, and roughly 0.566 degrees for average atmospheric refraction bending the light near the horizon.

Does it account for daylight saving time?

Not automatically. You enter the UTC offset in force on your chosen date, so a summer date in New York needs minus 4 rather than minus 5. There is no time-zone database behind the page.

Why is solar noon not at twelve o'clock?

Two reasons. Your longitude is usually not the meridian your time zone is set to, worth four minutes per degree, and the equation of time adds a seasonal swing of roughly minus 14 to plus 16 minutes.

What happens above the Arctic Circle?

On dates when the sun never sets or never rises, the hour angle equation has no solution. The tool reports polar day or polar night explicitly rather than returning a blank or a nonsense time.

Why does the sunrise I see differ from the time shown?

Because these are ideal-horizon times. Terrain, buildings, your elevation above sea level, and unusual atmospheric conditions all shift the moment the sun becomes visible from where you are standing.

This page reports astronomical calculations for general information only. Times are computed for an ideal sea-level horizon and are not certified for navigation, legal, or safety-critical use.

Advertisement
Advertisement

Take it further