Sunrise Sunset Calculator
Our sunrise-sunset calculator will help you estimate a location's sunrise and sunset time based on its latitude. As a bonus, you can also calculate the daylight hours of the area. These calculations require a good understanding of the Earth's rotation as it orbits around the Sun, starting with the fact that it is spherical (NOT FLAT!). Learn how to do these calculations yourself by going through the article below.
We also discussed another phenomenon related to Earth's rotation in the Coriolis effect calculator. Be sure to check it!
Sunrise and sunset
The sunrise is the first time the Sun appears over the horizon in the morning, marking the start of a new day. The sunset, on the other hand, marks the end of the day when the Sun disappears below the horizon in the evening.
Both sunrise and sunset times can vary significantly at different latitudes on Earth. This is because factors like the angle of the Earth's rotation relative to the Sun, the height of the Sun above the horizon, and local geography can all affect the timing and duration of these important events.
💡 Our Earth curvature calculator will prove a great read for our users inclined to understand the term horizon better.
One factor affecting sunrise and sunset times is the proximity to the equator. At latitudes closer to the equator, the Sun rises and sets at more constant points throughout the year since the Sun's path across the sky is more direct. In contrast, at latitudes further from the equator, there may be significant seasonal variations in the timing of sunrise and sunset as the Sun's path across the sky becomes more oblique during certain times of the year.
Calculating sunrise and sunset
The sunrise and sunset times are primarily dependent on two factors:
- The latitude of the location; and
- The day of the year.
Before calculating sunrise or sunset times, we introduce a new variable called the hour angle, given by:
Where:
- - The hour angle, negative for sunrise and positive for sunset;
- - The latitude of the location in degrees; and
- - The declination angle.
This declination angle is the angle between the Equator and the line joining centers of Earth and the Sun, which varies every day. It is given by:
Where is the day of the year. For instance, January 1ˢᵗ is the 1ˢᵗ day of the year, and December 31ˢᵗ is the 365ᵗʰ day of a non-leap year.
Our trigonometric functions calculator can help you find the values of sine, cosine, and tangent functions.
Using the sunrise hour angle, we can find out the sunrise time at a location:
Remember that is negative for sunrise!
Similarly, we can find out the sunset time at a location from its hour angle:
Keep in mind that is positive for sunset!
Calculating daylight hours
The daylight hours at a latitude is given by:
Adjusting for atmospheric refraction
Our calculations thus far did not factor in atmospheric refraction, which makes the sun appear higher than its actual position. The following adjustment to the formula to calculate sunrise and sunset time will account for this phenomenon:
Where is the altitude angle, equal to .
How to use this sunrise sunset calculator
Our calculator requires only two inputs from you:
- The day - click on the calendar 📅 icon in this sunrise-sunset calculator and select the date.
- The latitude of the location.
Based on this, the sunrise-sunset calculator will provide you with the following results adjusted for atmospheric refraction:
- Sunrise/sunset angles.
- Sunrise/sunset times.
- Hours of daylight by latitude.
Clicking on the advanced mode
button will give you these results without the adjustment for atmospheric refraction.