Sunrise Sunset Calculator

Day length15 h 6 min
Sunrise5:25 AM
Sunset8:30 PM
Solar noon12:57 PM
How this was calculated
  1. For June 21 (day 172 of the year) the sun's declination — its latitude on the celestial sphere — works out to 23.5 degrees, north of the equator in June and south in December.
  2. At latitude 40.71, the hour angle at which the sun crosses the horizon (zenith 90.833°, which folds in atmospheric refraction and the sun's own disc) is 113.2 degrees; the earth turns 1 degree every 4 minutes, so daylight spans 8 x 113.2 = 906 minutes.
  3. The equation of time corrects the clock for the earth's elliptical orbit and tilted axis: -1.4 minutes on this date, and longitude shifts solar noon by 4 minutes per degree from the time zone's meridian.
  4. Sunrise at 5:25 AM and sunset at 8:30 PM local time — an approximation good to a few minutes on open horizon; hills, buildings and weather move the visible events, and civil twilight is not included.

A sunrise sunset calculator tells you when the sun will rise and set on any day at any location. Enter your latitude and longitude, and the tool returns the sunrise time, sunset time, and total day length. Sunrise and sunset times follow from the sun's declination, the observer's latitude, and the hour angle at which the sun crosses the horizon. The horizon crossing uses a zenith of 90.833 degrees, folding in atmospheric refraction and the sun's own disc — sunrise is timed to the upper limb, not the centre. Where the sun never crosses the horizon the result is undefined by design: polar night (never rises) and polar day (never sets) are reported as such. The calculator's accuracy checks out against real almanac data: New York on the June solstice gives sunrise 5:25 AM, sunset 8:30 PM, day length 15 h 6 min — matching published almanac values within a minute or two. London on the December solstice gets 7 h 50 min of daylight; Sydney, on the same date, gets 14 h 24 min — the hemispheres trade places.

The calculation uses the NOAA solar approximation, the accepted standard for solar position math: declination and the equation of time are derived from the day of year, then sunrise = 720 - 4 x (longitude + hour angle) - equation of time, in minutes UTC. This method is widely used because it accounts for the factors that shift observed sunrise and sunset away from a simple geometric model. This page shows the formula, step-by-step workings, worked examples and sources so you can verify the numbers yourself.

Worked examples

New York, summer solstice

Primary result: 15 h 6 min — 5:25 AM to 8:30 PM — 15 h 6 min of daylight at the June solstice, matching the almanac. (40.71 · -74.01 · June · 21 · -4)

Day length15 h 6 min
Sunrise5:25 AM
Sunset8:30 PM
Solar noon12:57 PM

London, winter solstice

Primary result: 7 h 50 min — The year's shortest northern day: 7 h 50 min between an 8:04 AM sunrise and a 3:53 PM sunset. (51.51 · -0.13 · December · 21 · 0)

Day length7 h 50 min
Sunrise8:04 AM
Sunset3:53 PM
Solar noon11:59 AM

Sydney, December solstice

Primary result: 14 h 24 min — The same December date is Sydney's near-longest day: 14 h 24 min. (-33.87 · 151.21 · December · 21 · 11)

Day length14 h 24 min
Sunrise5:41 AM
Sunset8:05 PM
Solar noon12:53 PM

How sunrise and sunset are calculated

Sunrise and sunset times follow from three quantities: the sun's declination, the observer's latitude, and the hour angle at which the sun crosses the horizon. Declination tells you how far north or south the sun sits relative to the equator on a given day, while latitude fixes your viewing angle. The hour angle is the measure of how far the earth must rotate to bring the sun to the horizon line. Together these values pin down the moment the sun appears or disappears.

A sunrise sunset calculator built on the NOAA solar approximation works through these values step by step. First it derives declination and the equation of time from the day of year. The equation of time accounts for the slight mismatch between clock time and apparent solar time caused by the earth's elliptical orbit and axial tilt. With those in hand, the calculator applies the core formula: sunrise equals 720 minus 4 times the sum of longitude and hour angle, minus the equation of time, with the result expressed in minutes UTC. Sunset uses the same structure with the opposite hour angle.

The horizon crossing itself is not timed to the geometric centre of the sun. Instead the calculation uses a zenith angle of 90.833 degrees, which folds in atmospheric refraction and the sun's own disc. Refraction bends sunlight around the horizon so the sun appears slightly higher than its true position, and sunrise is defined as the moment the upper limb crosses the horizon, not the centre point. That 0.833-degree correction is what separates a usable almanac result from a purely geometric one.

Checked against real locations, the NOAA approximation holds up well. New York on the June solstice yields sunrise at 5:25 AM and sunset at 8:30 PM, for a day length of 15 hours and 6 minutes, matching published almanac values within a minute or two. London on the December solstice gets 7 hours and 50 minutes of daylight, while Sydney on the same date gets 14 hours and 24 minutes, as the hemispheres trade places. Where the sun never crosses the horizon the result is undefined by design: polar night, when the sun never rises, and polar day, when it never sets, are reported as such rather than forced into a number.

Why the solstices are not symmetric

A common surprise when reading a sunrise sunset calculator is that the earliest sunset and the latest sunrise do not fall on the solstice itself. The solstice marks the day with the shortest daylight in winter or the longest daylight in summer, but the extremes of sunrise and sunset times land on different dates. This asymmetry comes from the equation of time, the same correction built into the NOAA solar approximation that a sunrise sunset calculator uses.

The calculation begins with the sun's declination and the equation of time, both derived from the day of year. Declination sets how high the sun climbs, while the equation of time captures the mismatch between clock time and apparent solar time caused by the Earth's tilted axis and slightly elliptical orbit. Sunrise is then computed as 720 minus 4 times the sum of longitude and hour angle, minus the equation of time, in minutes UTC. The hour angle itself comes from the observer's latitude and the sun's declination, using a zenith of 90.833 degrees to fold in atmospheric refraction and the sun's own disc. Because sunrise is timed to the upper limb rather than the center, the horizon crossing happens slightly earlier in the morning and slightly later in the evening than a pure geometric calculation would suggest.

Because the equation of time shifts the solar day relative to clock time throughout the year, the latest sunrise and earliest sunset drift away from the solstice by several days. The solstice still gives the extreme total day length, but the individual sunrise and sunset extremes separate from it. The effect is large enough to notice in everyday almanac values. For New York on the June solstice, sunrise is 5:25 AM and sunset is 8:30 PM, giving a day length of 15 hours 6 minutes, matching published almanac values within a minute or two. Yet the earliest sunrise of the year falls a few days before the solstice, and the latest sunset falls a few days after it.

The same logic applies in the opposite hemisphere and at high latitudes. London on the December solstice gets 7 hours 50 minutes of daylight, while Sydney on the same date gets 14 hours 24 minutes, as the hemispheres trade places. Near the poles the sun may never cross the horizon at all, and the result is undefined by design: polar night, when the sun never rises, and polar day, when it never sets, are reported as such rather than forcing a misleading time.

Refraction and the 90.833-degree zenith

A sunrise sunset calculator does not treat sunrise and sunset as simple geometric events. If it did, the horizon crossing would occur when the center of the sun's disc sits exactly on the horizon, corresponding to a zenith angle of 90 degrees. Instead, the calculation uses a zenith of 90.833 degrees. That extra 0.833 degree accounts for two real-world effects that pure geometry ignores: atmospheric refraction and the visible upper edge of the sun itself.

Refraction bends sunlight as it enters Earth's atmosphere, lifting the image of the sun about 0.566 degree above its true position when it is near the horizon. This means the sun is still physically below the horizon when you see it begin to rise. The remaining portion of the 0.833-degree correction comes from measuring sunrise to the upper limb rather than the center of the disc. Because the sun has an apparent radius of about 0.267 degree, its top edge clears the horizon while the geometric center remains below it. Sunset follows the same logic in reverse: the upper limb disappears last, so the timed event again corresponds to a zenith of 90.833 degrees rather than 90.

The full calculation derives the sun's declination and the equation of time from the day of year, then computes the hour angle at which the sun reaches that 90.833-degree zenith. Sunrise follows the NOAA solar approximation: 720 minus 4 times the sum of longitude and hour angle, minus the equation of time, all in minutes UTC. Sunset uses the negative of the hour angle in the same formula. The observer's latitude and the sun's declination determine whether such an angle is reached at all.

Near the poles, the sun may never climb to 90.833 degrees or may never sink below it. In those cases the result is undefined by design. A sunrise sunset calculator reports polar night when the sun never rises and polar day when it never sets, rather than forcing a meaningless time. This keeps the output honest about conditions the standard formula was never meant to resolve.

Polar day and polar night

Inside the Arctic and Antarctic Circles, the sunrise sunset calculator runs into a mathematical wall. The horizon crossing uses a zenith of 90.833 degrees, folding in atmospheric refraction and the sun's own disc, so sunrise is timed to the upper limb rather than the centre. That threshold still has to be reachable, though. The sun's declination swings between roughly 23.4 degrees north and 23.4 degrees south over the year, and when it tilts far enough toward your hemisphere, the entire solar path stays above that horizon line. The hour-angle equation, which normally tells you when the sun crosses the horizon, simply has no solution.

When that happens, the calculator does not fudge a number or fall back on the previous day's value. Where the sun never crosses the horizon the result is undefined by design: polar night, when the sun never rises, and polar day, when the sun never sets, are reported as such. This is not a glitch in the NOAA solar approximation that powers the calculation. It is the correct answer. The same declination values and equation of time that produce New York's June solstice sunrise of 5:25 AM and sunset of 8:30 PM, matching published almanac values within a minute or two, also produce a flat no-solution result for a location above the Arctic Circle on the same date.

The boundary where this starts depends on latitude and time of year. Around the June solstice, locations north of about 66.6 degrees latitude experience polar day, where the sun skims the horizon at midnight but never drops below it. The mirror image happens around the December solstice, when those same latitudes plunge into polar night. South of the equator, the seasons flip: southern polar day falls in December, southern polar night in June. London on the December solstice gets 7 h 50 min of daylight while Sydney, on the same date, gets 14 h 24 min, and as you push closer to the poles those daylight hours stretch until they hit zero or twenty-four.

What the sky actually does during these periods is subtler than total darkness or total light. During polar night, the sun stays below the horizon, but if it tracks close enough to the horizon line you may still see a prolonged twilight glow at midday rather than true blackness. During polar day, the sun makes a full circle around the sky without setting, rising and falling in elevation but never crossing out of view. The calculator's job is to flag these cases clearly so you are not left staring at a blank or impossible time.

FAQs

What time is sunrise today?

It depends on your latitude, longitude, date and time zone. Enter them here to get your result. For example, for New York on June 21 the answer is 5:25 AM. Your local conditions will differ, so always input your specific location and date for an accurate sunrise time.

How is sunrise time calculated?

Sunrise is calculated from the sun's declination and the equation of time for the date, combined with the horizon hour angle for the latitude. A 4-minutes-per-degree longitude correction is then applied. This NOAA approximation accounts for Earth's tilt, orbit, and your geographic position relative to your time zone.

Why is the earliest sunset not on the winter solstice?

The equation of time shifts solar noon through December, so the earliest sunset falls about two weeks before the solstice in mid-northern latitudes. The solstice marks the shortest day, but the shifting of solar noon means the earliest sunset occurs earlier in the month.

What is solar noon?

Solar noon is when the sun crosses the local meridian. In the New York example, it occurs at 12:57 PM, not 12:00. The difference arises from longitude within the time zone and the equation of time, which accounts for Earth's elliptical orbit and axial tilt throughout the year.

How accurate is this calculator?

Results are within a few minutes on an open horizon for most inhabited latitudes. Terrain, buildings and weather move the visible events, so your actual view may differ. Note that twilight is not included in these calculations, only the moment the sun's upper edge meets the horizon.

What happens inside the polar circles?

On some dates the sun never rises or never sets. The calculator reports polar night or polar day instead of inventing times. This reflects the actual conditions at high latitudes during certain seasons, when Earth's tilt causes extended periods of continuous darkness or daylight.

Sources

Related calculators

Moon Phase Calculator
The moon's phase for any date: its age in the 29.53-day cycle, illumination percentage, phase name and the countdown to the next full and new moons.
Age in Days Calculator
Exactly how many days old someone is, plus the date of the next round-number milestone — the 10,000-day celebration calculators miss.
UV Index Calculator
Minutes to sunburn at a given UV index for your Fitzpatrick skin type — and how far an SPF rating stretches them.
Battery Charge Time Calculator
Estimate how long a battery takes to charge from its capacity, the charger's current, charging efficiency and how far it was discharged.