CalcSeed

Sunrise & Sunset Calculator

Enter a latitude, longitude and date to estimate sunrise and sunset times.

=
Quick answer: with the default inputs (40.71 °, -74.01 °, 2,026, 6), the sunrise is 14.92. Change any input to update the result.
Sunrise
—

What this calculator does

Enter a latitude, a longitude and a date, and the calculator estimates sunrise time, sunset time and total daylight hours using the standard sunrise equation. At the defaults — latitude 40.71°, longitude −74.01° (New York City), June 21, 2026 — the results are sunrise 04:28, sunset 19:24 and 14.92 hours of daylight, the longest day of the year at that latitude. These clock times are aligned to standard time, not daylight saving time, which the accuracy section explains.

H=acos(−tanφ×tanδ)H = cos^{-1}(- anphi andelta)

How the sunrise equation works

Three ingredients drive the calculation. First, the day of the year fixes the Sun’s declination — its angle north or south of the equator — via declination = −23.44 × cos(2π ÷ 365 × (n + 10)), which swings from +23.44° at the June solstice to −23.44° at the December solstice. Second, latitude meets declination in the hour angle formula: H = acos(−tan(latitude) × tan(declination)), the angle the Earth turns through between sunrise and solar noon. Third, daylight is 2 × H ÷ 15 hours, because the Earth rotates 15° per hour.

The clock times then hang on solar noon. This calculator places solar noon at 12 − longitude ÷ 15, corrected to the nearest whole time zone with tz = round(longitude ÷ 15), and sets sunrise and sunset symmetrically around it at H ÷ 15 hours before and after. For New York’s longitude of −74.01°, the zone correction is round(−4.934) = −5 hours.

Worked example: New York, June 21

June 21 is day 172 of 2026, so the declination term is −23.44 × cos(2π ÷ 365 × 182) ≈ +23.44° — the Sun stands at its northernmost angle. Plugging into the hour angle: cos H = −tan(40.71°) × tan(23.44°) = −0.861 × 0.434 = −0.373, so H = acos(−0.373) ≈ 111.9°. Daylight is 2 × 111.9 ÷ 15 = 14.92 hours. Solar noon sits at 12 − (−74.01 ÷ 15) = 16.93 hours, zone-corrected back to 11.93, and sunrise lands 111.9 ÷ 15 = 7.46 hours earlier at 04:28, with sunset 7.46 hours later at 19:24.

What latitude does to daylight

Latitude is the dominant variable. At the equator every day of the year runs about 12.0 hours; at mid-latitudes the seasonal swing is several hours; near the poles it becomes absolute — the formula clamps at H = 180° for 24 hours of daylight and H = 0° for none. The table shows the two solstices at four latitudes, all computed from the same equation.

LatitudeDaylight, Jun 21Daylight, Dec 21Equinox
0° (equator)12.0 h12.0 h12.0 h
40.7° (New York)14.9 h9.1 h12.0 h
60° (Anchorage, Helsinki)17.5 h6.5 h12.0 h
80° (high Arctic)24.0 h0.0 h12.0 h

The swing is the number to remember: New York gains and loses about 5.9 hours a year between solstices, Anchorage about 11. Within a single season the change is smooth but fastest near the equinoxes, where daylight shifts by roughly 2–4 minutes per day at 40° — and nearly zero around the solstices, which is why the longest evening feels stable for a week or two.

Why longitude only shifts the clock

Longitude changes when the Sun crosses your meridian, not how long the day is. Moving 1° of longitude west delays solar noon by 4 minutes (15° per hour, 60 ÷ 15 = 4). Because time zones are wide, the clock correction only applies the zone center: New York’s −74.01° longitude is 4.01° east of its zone’s ideal meridian (−75°), so solar noon arrives about 16 minutes before the zone ideal. Two cities at the same latitude in different zones keep identical daylight hours but different clock times for sunrise.

What affects the result most

  • Latitude: sets the daylight length, from 12 hours at the equator to 24 or 0 in the polar caps
  • Date: moves the declination through ±23.44° over the year
  • Longitude: shifts solar noon by 4 minutes per degree against the zone clock
  • Time zone rounding: the calculator snaps to the nearest whole-hour zone, up to about 30 minutes of clock skew

Approximation limits

This estimate ignores the equation of time (a ±16-minute wobble in solar noon across the year), atmospheric refraction details, and local terrain — mountains shift the visible sunrise by minutes either way. Standard-time results are usually within about 15 minutes of published almanac values. Daylight saving time is not applied: New York’s clock sunrise reads about 05:28 under daylight saving, one hour later than the 04:28 standard-time figure here, and similarly the 19:24 sunset reads as 20:24 on the summer clock. Near the poles, or during polar day and night, the Sun may not cross the horizon at all.

Reading the result against an almanac

Published tables carry full corrections — refraction, the equation of time and civil time zones — so expect small systematic differences rather than random ones: this calculator runs a touch early or late depending on the season, and the gap rarely exceeds 15 minutes. For scheduling anything where five minutes matter, such as a telescope alignment, let the almanac win; for planning a hike, a shoot or a commute, the two agree well enough to be interchangeable.

Common uses

  • Planning photography around golden hour, which brackets sunrise and sunset by roughly an hour
  • Scheduling outdoor work or training before the daylight window closes in autumn
  • Comparing seasonal daylight between cities before a move or trip
  • Rough solar-panel yield estimates, since daylight hours set the theoretical maximum exposure

Frequently asked questions

How accurate is this sunrise calculator?

Within about 15 minutes of published standard-time values. It ignores the equation of time and terrain, and it does not apply daylight saving time, which shifts the clock reading by a full hour.

Why does New York show sunrise at 04:28 in June?

That is standard time. Under daylight saving the clock reads 05:25, one hour later. The calculator returns solar-aligned standard time for the nearest time zone.

How many hours of daylight are there at the summer solstice?

It depends on latitude: about 14.9 hours at 40.7°, 17.5 hours at 60°, and a full 24 hours of continuous daylight above roughly 65.6° in June.

Does longitude change the length of the day?

No. Longitude only shifts the clock time — 4 minutes per degree — while latitude and date set the daylight length.

How fast do sunrise and sunset shift each day?

Fastest near the equinoxes, roughly 2–4 minutes per day at 40°, and almost nothing within a week or two of the solstices.

What is the Sun’s declination on June 21?

About +23.44°, its maximum northern angle. It falls to −23.44° on December 21 and crosses 0° at the equinoxes.

Does this account for daylight saving time?

No. The output is standard solar-aligned clock time; add one hour yourself during DST periods to read it on a summer clock.

What happens above the Arctic Circle?

The hour-angle formula clamps: in midsummer H reaches 180° for 24 hours of daylight, in midwinter 0° for no sunrise at all, with transition days around both.

Why is solar noon not exactly 12:00?

Time zones span 15° but cities sit off their zone’s central meridian, and the equation of time adds up to ±16 more minutes; New York’s solar noon lands near 11:56 standard time in late June.

Method and sources

Calculation basis

Calendar logic follows the proleptic Gregorian calendar (ISO 8601) with correct leap-year handling.

Last updated: November 18, 2026
Formula & data sources
  • Sunrise equation using solar declination and the hour angle; NOAA solar position approximations.

Cite this page

Reference formats
APA 7CalcSeed. (2026, November 18). Sunrise & Sunset Calculator. https://calcseed.com/c/date/sunrise-sunset-calculator/
MLA 9"Sunrise & Sunset Calculator." CalcSeed, 18 Nov. 2026, calcseed.com/c/date/sunrise-sunset-calculator/.
ChicagoCalcSeed. "Sunrise & Sunset Calculator." Last modified November 18, 2026. https://calcseed.com/c/date/sunrise-sunset-calculator/

Related calculators

People also calculate