---
slug: sunrise-sunset-calculator
title: "Sunrise & Sunset Calculator"
category: date
updated: 2026-11-18
canonical: https://calcseed.com/c/date/sunrise-sunset-calculator/
html: /c/date/sunrise-sunset-calculator/
---

# Sunrise & Sunset Calculator

Estimate sunrise and sunset times for any latitude, longitude and date using the standard sunrise equation. Free and instant.

## Quick answer

**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.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| Latitude | 40.71 | ° |
| Longitude | -74.01 | ° |
| Year | 2026 |  |
| Month | 6 |  |
| Day | 21 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Daylight hours | 14.9205 |  |

## Formula

```text
hour angle H = acos(−tan(latitude) × tan(declination))
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| Latitude | number | ° | 40.71 |
| Longitude | number | ° | -74.01 |
| Year | number |  | 2026 |
| Month | number |  | 6 |
| Day | number |  | 21 |

## Outputs

| Result | Format |
| --- | --- |
| Sunrise | primary |
| Sunrise | text |
| Sunset | text |
| Daylight hours | number |

## How it works

### 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&deg;, longitude −74.01&deg; (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.

### How the sunrise equation works

Three ingredients drive the calculation. First, the day of the year fixes the Sun&rsquo;s declination — its angle north or south of the equator — via declination = −23.44 × cos(2&pi; ÷ 365 × (n + 10)), which swings from +23.44&deg; at the June solstice to −23.44&deg; 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&deg; 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&rsquo;s longitude of −74.01&deg;, 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&pi; ÷ 365 × 182) ≈ +23.44&deg; — the Sun stands at its northernmost angle. Plugging into the hour angle: cos H = −tan(40.71&deg;) × tan(23.44&deg;) = −0.861 × 0.434 = −0.373, so H = acos(−0.373) ≈ 111.9&deg;. 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&deg; for 24 hours of daylight and H = 0&deg; for none. The table shows the two solstices at four latitudes, all computed from the same equation.

| Latitude | Daylight, Jun 21 | Daylight, Dec 21 | Equinox |
| --- | --- | --- | --- |
| 0&deg; (equator) | 12.0 h | 12.0 h | 12.0 h |
| 40.7&deg; (New York) | 14.9 h | 9.1 h | 12.0 h |
| 60&deg; (Anchorage, Helsinki) | 17.5 h | 6.5 h | 12.0 h |
| 80&deg; (high Arctic) | 24.0 h | 0.0 h | 12.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&deg; — 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&deg; of longitude west delays solar noon by 4 minutes (15&deg; per hour, 60 ÷ 15 = 4). Because time zones are wide, the clock correction only applies the zone center: New York&rsquo;s −74.01&deg; longitude is 4.01&deg; east of its zone&rsquo;s ideal meridian (−75&deg;), 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 &plusmn;23.44&deg; 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 &plusmn;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&rsquo;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

## FAQ

### 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&deg;, 17.5 hours at 60&deg;, and a full 24 hours of continuous daylight above roughly 65.6&deg; 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&deg;, and almost nothing within a week or two of the solstices.

### What is the Sun&rsquo;s declination on June 21?

About +23.44&deg;, its maximum northern angle. It falls to −23.44&deg; on December 21 and crosses 0&deg; 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&deg; for 24 hours of daylight, in midwinter 0&deg; for no sunrise at all, with transition days around both.

### Why is solar noon not exactly 12:00?

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

## Method and sources

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

Last updated: 2026-11-18.
- Sunrise equation using solar declination and the hour angle; NOAA solar position approximations.
