Sunrise and Sunset Calculator
Find sunrise, sunset, solar noon, day length and civil twilight times for any date and place on Earth, using a preset city or your own latitude and longitude. Example: New York on June 21, 2026 has about 15 hours 6 minutes of daylight, with sunrise near 5:25 AM and sunset near 8:31 PM.
Show steps
How to use the Sunrise and Sunset Calculator
- Pick a city, or choose Custom and enter latitude, longitude and UTC offset.
- Choose the date.
- Press Calculate for sunrise, sunset, solar noon, day length and twilight.
Formula and method
The sun’s declination and the equation of time give the hour angle H at which the sun reaches the horizon: cos H = (cos 90.833 – sin(lat) sin(dec)) / (cos(lat) cos(dec)). Sunrise and sunset occur at solar noon minus and plus H/15 hours. The 90.833 degree zenith includes the sun’s radius and atmospheric refraction. Civil twilight uses 96 degrees.
Worked example: New York, June 21, 2026
| Item | Time |
|---|---|
| Sunrise | 5:25 AM |
| Solar noon | 12:58 PM |
| Sunset | 8:31 PM |
| Day length | 15 h 6 m |
Day length around the year at 40 degrees north
| Date | Daylight |
|---|---|
| Dec 21 (winter solstice) | About 9 h 15 m |
| Mar 20 (equinox) | About 12 h 8 m |
| Jun 21 (summer solstice) | About 15 h 0 m |
| Sep 22 (equinox) | About 12 h 8 m |
Why days get longer and shorter
Earth’s axis is tilted about 23.4 degrees. As Earth orbits the sun, each hemisphere leans toward or away from it, which changes how high the sun climbs and how long it stays above the horizon. The effect grows with latitude.
Twilight
Civil twilight is when the sun is up to 6 degrees below the horizon: it is bright enough to see outdoors without lights. Nautical and astronomical twilight follow, down to 12 and 18 degrees.
Frequently asked questions
How are sunrise and sunset calculated?
From the sun’s position for your latitude, longitude and date.
Why is solar noon not at 12:00?
Time zones are wide, and the equation of time shifts the sun by up to about 16 minutes through the year.
What is civil twilight?
The period before sunrise and after sunset when the sun is less than 6 degrees below the horizon.
Why does the sun not set in summer near the poles?
Above the Arctic and Antarctic circles the tilt keeps the sun above the horizon for weeks.
How accurate is this?
Typically within a minute or two.
Is daylight saving time included?
Yes for the preset cities; for custom locations enter the offset in effect.
Sources
- NOAA Global Monitoring Laboratory: Solar calculator
- U.S. Naval Observatory: Astronomical Applications
Related calculators
Related to This Article
More math articles
- Registered voters
- Pace Calculator
- Alabama ACAP Grade 5 Math Worksheets — 49 Free Printable Single-Skill PDFs
- 3rd Grade MCAS Math Worksheets: FREE & Printable
- Top Presentation Tips for Math Students: From Explaining Formulas to Creating Clear Slides
- Hamilton’s Financial Program: Debt, Bank and Constitutional Debate
- Top 10 6th Grade PARCC Math Practice Questions
- How to Graph Triangles and Quadrilaterals?
- Free Grade 8 English Worksheets for Washington Students
- Nonresponse bias


What people say about "Sunrise and Sunset Calculator: Times, Day Length & Twilight for Any Place"?
No one replied yet.