# Sunrise Sunset Calculator

By Rahul Dhari
Last updated: Nov 29, 2021

The sunrise sunset calculator will assist you in determining the sunrise and sunset times for a particular day for all populated latitudes. The Earth rotates at an angular velocity of 15°/hour; therefore, there is a need for a formula to calculate sunrise and sunset based on the location. The sunrise and sunset times are a function of location and day of the year. Based on these timings, the calculator also estimates how many hours of daylight a place would receive.

Read on to understand what time is sunrise and sunset today? Or you want to know how to calculate sunrise and sunset time based on the formula.

## Sunrise and Sunset times

The term sunrise time refers to the time when the sun first appears or when daylight has arrived. Similarly, sunset time is defined as the time when the sun disappears below the horizon. For a given location having latitude φ° and $n^{th}$ day of the year, the sunrise time can be estimated using the hour angle for sunrise/sunset, $\omega$.

$\omega = \mp \cos^{-1}( -\tanφ \tan δ )$

Where δ is the declination angle. The sunrise angle is negative, whereas the sunset angle is positive. The declination angle is the angle between the equator and the line joining centers of Earth and sun. The angle of declination varies with each day, n such that:

$δ = 23.45 \sin ( (284 + n)*\frac{360}{365} )$

where n is the $n^{th}$ day of the year. The declination angle has several formulae for estimation, the above approximation is based on the work of P.I. Cooper from the year 1969.

Once we have the hour angle for sunrise, $\omega$, it is added (negative) from the solar noon to determine the sunrise time.

$\text{sunrise time} = 12 + \frac{\omega}{15}$

The sunset hour angle $\omega$ is the negative of the sunrise hour angle or positive. The sunset time is then estimated by adding it to the solar noon:

$\text{sunset time} = 12 + \frac{\omega}{15}$

The above equations are formulae to calculate sunrise and sunset times. Once we know the timings, we can determine the hours of daylight for a latitude using the equation:

$\scriptsize \text{Daylight hrs} = \frac{2}{15} * \cos^{-1} (- \tan φ * \tan δ)$

Alternatively, the daylight hours equation can also be written as:

$\small \text{Daylight hrs} = \frac{2}{15} * \text{Sunset angle}$

While the above methodology is correct, it does not take into account atmospheric refraction. This effect occurs due to the sunlight refracting through the atmosphere and making the sun appear higher above the horizon than its actual position. A variable sin(a) is included in the sunrise and sunset formula to take this phenomenon into account. Therefore, the corrected sunset and sunrise equation is:

$\omega = \pm \cos^{-1} {\frac {\sin a - \sin φ \cos δ } { \sin φ \cos δ } }$

Where a is the altitude angle having the value of -0.83°.

## How to calculate the times of sunrise and sunset for tomorrow?

To calculate sunrise and sunset times:

1. Enter the date for tomorrow.
2. Fill in the latitude for your location (use positive for °N and negative for °S).
3. The calculator will return the declination angle for the date and subsequently calculate the sunrise and sunset times for the particular day.
4. The tool will also return how many hours of daylight you will receive.

By default, the calculator shows you results taking into account atmospheric refraction. To see the uncorrected results, active the Advanced mode of the calculator.

## Example: Using the sunrise sunset calculator

When are sunrise and sunset today, given the date is 15th March? Also, find out how many hours of daylight there is on that date? Take location as 45 °N.

To know what time is sunrise and sunset today:

1. Pick the date for today as 15th March.
2. Enter the latitude as 45°.
3. The declination angle is returned as:
\scriptsize \qquad \begin{align*} δ &= 23.45 * \sin ( (284 + 75)*\frac{360}{365} ) \\ &= -2.82° \end{align*}
1. Using the sunrise equation:
\scriptsize \qquad \begin{align*} ω &= \mp \cos^{-1}( -\tan 40 * \tan -2.82 ) \\ &= -87.2° \end{align*}

and sunrise time is:
12 - 87.6/15 = 6:09 am.

1. Similarly, the sunset time is:
12 + 87.6/15 = 5:50 pm.
1. Considering atmospheric refraction, the sunrise and sunset hour angles become:
\scriptsize \quad \begin{align*} \omega &= \mp \cos^{-1}( \frac{ \sin -0.83 - \sin 40 \cos -2.42 } { \sin 40 \cos -2.42 } ) \\ &= \mp 88.4° \end{align*}
1. The sunrise and sunset times are: 6:04 am and 5:55 pm local time.

The atmosphere refraction has set the sunrise time 5 minutes early based on the appearance of the first light and pushed the sunset time by 5 minutes, increasing the daylight hours by 10 minutes for a day.

## References

Duffie, John A., and William A. Beckman. “Fundamentals.” Introduction. In Solar Engineering of Thermal Processes, 1–25. Hoboken, NJ: Wiley, 2013.

Kalogirou, Soteris. “Environmental Characteristics.” Essay. In Solar Energy Engineering: Processes and Systems, 49–71. Oxford, UK: Academic Press, 2014.

## FAQ

### What is atmospheric refraction?

The phenomenon that celestial objects appear higher above the horizon than they actually are is known as atmospheric refraction. This occurs because of the refraction of light reflected from the objects by the atmosphere.

### What is the angular velocity of earth?

The earth rotates with an angular velocity of 15° per hour.

### How do I calculate sunrise hour angle?

To calculate sunrise hour angle:

1. Find the latitude and day of the year, n.
2. Estimate the declination angle using the equation:
δ = 23.45 * sin((284 + n) * 360/365).
3. Multiply the tangents of latitude and declination angle.
4. Find the cosecant inverse for the negative of the product.
5. Multiply the resultant with -1 to get the hour angle for sunrise.

### How do I calculate daylight hours?

To calculate daylight hours for today:

1. Multiply 2 by the sunrise or sunset angle.
2. Divide the product with 15 to get the daylight hours.
Daylight hours = 2/15 * sunrise angle
Rahul Dhari
Day
Latitude (φ)
deg
Day of the year
342
Declination angle (δ)
-22.9
deg
w/ Atmospheric refraction
Sunrise/Sunset angle (ω) ∓
deg
Sunrise time
hrs
min
Sunset time
hrs
min
Daylight hours
hrs
min
People also viewed…

### Arrow speed

Arrow speed calculator finds the real speed of an arrow for a bow with custom parameters.

### Body fat

Use the body fat calculator to estimate what percentage of your body weight comprises of body fat.

### Heat capacity

Determine the heat capacity of a body using Omni's heat capacity calculator.

### Humans vs vampires

Vampire apocalypse calculator shows what would happen if vampires were among us using the predator - prey model.