# Sunrise and Sunset Calculator

URL: https://speedycalculator.com/calculators/physics/sunrise-sunset/
Last updated: 2026-10-30

> The sunrise and sunset calculator finds the local times of sunrise, solar noon and sunset and the length of daylight for any latitude, longitude and date, using NOAA's solar equations.

## Inputs

- Latitude (° N positive)
- Longitude (° E positive)
- Date
- Time zone (UTC offset in hours)

## Results

- Equation of time
- Solar declination
- Sunrise
- Solar noon
- Sunset
- Day length
- Polar condition

## Formula

```
cos(ha₀) = cos(90.833°)/(cos φ cos δ) − tan φ tan δ,  sunrise = 720 − 4(λ + ha₀) − EoT + 60·tz (minutes)
sunset = 720 − 4(λ − ha₀) − EoT + 60·tz,  solar noon = 720 − 4λ − EoT + 60·tz
```

## Explanation

Day length changes through the year because Earth's axis is tilted. Near the poles the Sun may not set in summer or rise in winter. The 0.833° in the formula accounts for atmospheric refraction and the Sun's radius.

### How to use the Sunrise and Sunset Calculator

- **Latitude (° N positive)**
- **Longitude (° E positive)**
- **Date**
- **Time zone (UTC offset in hours)**

Results update as you type, every field has its own unit menu, and everything is calculated in your browser.

### How it works

Enter the latitude and longitude, the date and the UTC offset of your local time (including daylight saving).

### Inputs explained

FieldWhat to enterLatitude (° N positive)A numberLongitude (° E positive)A numberDateA dateTime zone (UTC offset in hours)A number

### What each result means

- **Equation of time** = 4×(mod([L] - deg(atan2(cos([eps])×sin([lambda]), cos([lambda]))) + 540, 360) - 180)
- **Solar declination** = deg(asin(sin([eps])×sin([lambda])))
- **Sunrise** = (720 - 4×([Longitude (° E positive)] + [ha0]) - [Equation of time] + 60×[Time zone (UTC offset in hours)])÷60
- **Solar noon** = (720 - 4×[Longitude (° E positive)] - [Equation of time] + 60×[Time zone (UTC offset in hours)])÷60
- **Sunset** = (720 - 4×([Longitude (° E positive)] - [ha0]) - [Equation of time] + 60×[Time zone (UTC offset in hours)])÷60

## Worked example

Inputs — Latitude (° N positive): 51.5074; Longitude (° E positive): -0.1278; Date: 2026-10-25; Time zone (UTC offset in hours): 0.

Results — Equation of time = 15.934 min; Solar declination = -12.1954 °; **Sunrise = 06:42**; Solar noon = 11:45; Sunset = 16:47; Day length = 10 h 5 min; Polar condition = Normal day.

## Key terms

- **Day length**: Time between sunrise and sunset.

## FAQ

**Why do sunrise times differ across a time zone?**
Longitude changes solar time by 4 minutes per degree.

**What is solar noon?**
When the Sun is highest – rarely exactly 12:00.

**Why is 90.833° used?**
It includes refraction (0.567°) and the Sun's radius (0.267°).

**How accurate is it?**
Within about a minute at mid-latitudes.


## Sources

- [NOAA Global Monitoring Laboratory – Solar calculation details](https://gml.noaa.gov/grad/solcalc/calcdetails.html)
- [OpenStax – Astronomy 2e](https://openstax.org/details/books/astronomy-2e)
