How to use the sunrise and sunset calculator
- Pick the date. The default is today.
- Enter your latitude and longitude in decimal degrees. North and east are positive, so places in the United States have a negative longitude.
- Enter the UTC offset in effect on that date, such as -5 for New York in winter and -4 in summer. Use decimals for places such as India (5.5).
- Read sunrise, solar noon, sunset, daylight length and first and last light. Copy or print the result if you need it.
Formula
Solar noon = 12:00 - 4 min x longitude - equation of time + UTC offset x 60 min
cos(h) = cos(90.833 degrees) / (cos(latitude) x cos(declination)) - tan(latitude) x tan(declination)
Sunrise = solar noon - 4 min x h and sunset = solar noon + 4 min x h, with h in degrees
The declination of the sun and the equation of time come from the NOAA solar calculation, which follows Jean Meeus, Astronomical Algorithms. The zenith of 90.833 degrees includes atmospheric refraction and the radius of the sun.
New York City on June 21, 2024
Using latitude 40.7128, longitude -74.006 and a UTC offset of -4 (daylight saving time), the calculator gives sunrise at 5:25 AM, solar noon at 12:58 PM and sunset at 8:31 PM. That is 15 hours 06 minutes of daylight, with first light (civil dawn) at 4:52 AM and last light at 9:04 PM.
On December 21, 2024 with an offset of -5, the same place has sunrise at 7:17 AM and sunset at 4:32 PM, which is 9 hours 15 minutes of daylight. Checking the first example against an independent form of the sunrise equation gave times within one minute.
Why you enter the coordinates and offset yourself
The calculator works entirely in your browser, so it does not look up your location, your time zone or the daylight saving rules. You enter the latitude, longitude and the UTC offset that applies on the date. Look up the coordinates of a town on any map. A map pin gives decimal degrees. If you pick a date inside daylight saving time, use the summer offset, because sunrise and sunset are given in clock time with that offset applied.
If you want to convert a time to a different zone, use the time zone converter, and the world clock shows the current time in several cities.
Accuracy
NOAA describes its solar calculations as theoretically accurate to within a minute for latitudes between 72 degrees north and south, and to about 10 minutes beyond that. See the NOAA solar calculator details. What you see at a real place can differ by several minutes because of hills and buildings on the horizon, your height above the ground, weather and the exact bending of light in the air that day. Sunrise here means the top edge of the sun at a flat sea level horizon.
The positions of the sun are recomputed once near each event for better accuracy, and the tool works for dates from 1901 to 2100.
Midnight sun and polar night
Close to the poles the sun can stay above the horizon all day in summer, or never rise in winter. When that happens, the tool says so instead of showing times, and still gives solar noon, the moment the sun is highest. Civil twilight, the first and last light, is the time when the sun is 6 degrees below the horizon, and it is shown when it happens that day. For the phase of the moon on the same date, use the moon phase calculator.
Assumptions and limits
- Latitude is from -90 to 90, longitude from -180 to 180 with east positive, and the UTC offset from -12 to 14 hours.
- Times are for a flat horizon at sea level and use a zenith of 90.833 degrees. Elevation and terrain are not modeled.
- The offset you enter is applied to every time shown. The tool does not know when daylight saving time starts or ends.
- Dates from 1901 to 2100 are accepted. Results beyond about 72 degrees of latitude are less accurate.
Frequently asked questions
How do I find sunrise and sunset for my town?
Enter the date, the latitude and longitude of the town, and the UTC offset it uses on that date. The result shows sunrise, solar noon, sunset and the length of the day.
What is solar noon?
It is the moment the sun is at its highest point in the sky for the day. It is not always 12:00, because it depends on your longitude within your time zone and on the equation of time.
Why is my result a few minutes different from my phone?
Different tools use slightly different rules for refraction and for the sun's edge, and your phone may include your height above sea level. A difference of a minute or two is normal.
What is civil twilight?
It is the time between the sun being 6 degrees below the horizon and sunrise (or sunset to dusk). There is enough light to see clearly outdoors without lamps. The tool shows it as first light and last light.