Sunrise Sunset Calculator
Enter Location and Date
About This Tool
What Is the Sunrise Sunset Calculator?
The Sunrise Sunset Calculator is a free online tool that computes the precise times of sunrise, sunset, solar noon, day length, and all three categories of twilight for any location on Earth on any date. Enter a latitude, longitude, and UTC offset, and the tool instantly returns accurate solar event times using the same astronomical algorithms employed by meteorological services. All calculations happen entirely in your browser — no server requests and no data collected.
Whether you are a photographer planning a golden-hour shoot, a hiker calculating how many daylight hours remain, an astronomer preparing for an observing session, or a developer building a solar-aware application, this calculator gives you the solar data you need in seconds.
Understanding Solar Events
Sunrise and Sunset
Sunrise is defined as the moment the upper limb (top edge) of the sun first appears above the geometric horizon, accounting for atmospheric refraction. Refraction bends the sun's apparent position upward by approximately 0.575° near the horizon, which is why we can see the sun for several minutes after it has geometrically set below the horizon. The standard refraction correction used by most solar calculators, including this one, is 0.833° — combining the 0.575° refraction value with the 0.267° angular radius of the sun's disk.
Sunset is the corresponding moment when the upper limb of the sun disappears below the horizon in the evening. The length of the day is the interval between sunrise and sunset.
Solar Noon
Solar noon (also called transit) is the moment when the sun crosses the local meridian and reaches its highest altitude above the horizon for the day. It is the midpoint of the sun's daily arc across the sky, and sunrise and sunset are symmetric about it. Solar noon rarely coincides exactly with 12:00 on the clock. The difference arises from two effects: the equation of time (which describes how the sun runs up to 16 minutes ahead or behind a uniform clock across the year, due to Earth's orbital eccentricity and axial tilt) and the offset between your geographic longitude and the central meridian of your time zone.
The Three Types of Twilight
Twilight is the period of partial natural light before sunrise and after sunset, caused by the scattering of sunlight by the atmosphere while the sun is below the horizon. There are three formally defined categories, each corresponding to a solar depression angle.
Civil Twilight (Sun 0° to 6° below horizon)
Civil twilight is the brightest phase of twilight. Outdoors, there is sufficient illumination for most activities without artificial lighting. The horizon is clearly visible. Civil twilight corresponds to the period from before sunrise until the sky becomes fully bright, and the equivalent period after sunset. Many jurisdictions define the start and end of legal working hours, aviation regulations, and navigation rules with reference to civil twilight.
Nautical Twilight (Sun 6° to 12° below horizon)
During nautical twilight, the horizon is still visible, making it possible for navigators to take celestial observations and determine their position at sea by measuring the angles of stars relative to the horizon with a sextant. The name reflects this traditional maritime use. In practice, nautical twilight marks the transition from dim twilight to near-darkness.
Astronomical Twilight (Sun 12° to 18° below horizon)
Astronomical twilight ends when the sun reaches 18° below the horizon, after which the sky is considered fully dark for astronomical observation. Before the end of astronomical twilight, residual atmospheric glow may interfere with deep-sky observations. The astronomical twilight end time is therefore important for observers planning to image faint nebulae, galaxies, or other dim objects that require the darkest possible sky conditions.
The Calculation Algorithm
This calculator implements the NOAA solar position algorithm, which is derived from the equations in Jean Meeus's authoritative book Astronomical Algorithms (1998). The algorithm proceeds in several steps. First, the input date is converted to a Julian Day Number — a continuous count of days used in astronomy. The Julian Day is then used to compute the number of Julian centuries elapsed since J2000.0 (noon on 1 January 2000 UTC), which is the standard reference epoch for modern solar calculations.
From the Julian century count, the algorithm derives the sun's geometric mean longitude, mean anomaly, and the equation of the centre, which together give the sun's true geometric longitude along the ecliptic. Nutation and aberration corrections are applied to obtain the apparent longitude. The sun's apparent longitude, combined with the obliquity of the ecliptic (the tilt of Earth's axis, approximately 23.4°), yields the solar declination — the sun's angular distance north or south of the celestial equator.
The equation of time, which describes the difference between apparent solar time and mean solar time, is also computed from the same parameters. Solar noon occurs when the equation of time and longitude correction are both accounted for. Sunrise and sunset are found by solving for the hour angle — the angle by which the sun must still rotate to reach the horizon — using the spherical trigonometry formula that relates the solar zenith angle to the observer's latitude and the sun's declination.
Polar Day and Polar Night
At high latitudes, particularly above the Arctic Circle (approximately 66.5°N) and below the Antarctic Circle (approximately 66.5°S), the solar geometry can produce conditions where the hour angle equation has no solution. If the cosine of the hour angle evaluates to less than −1, the sun never sets: this is polar day, also known as the midnight sun. If it evaluates to greater than +1, the sun never rises: this is polar night. These conditions do not occur suddenly at the Arctic Circle but gradually increase in duration as latitude increases, reaching up to six months of continuous daylight or darkness at the poles themselves. When this tool detects a polar condition for your location and date, it will display an appropriate notice instead of event times.
Day Length and Seasonal Variation
Day length — the interval between sunrise and sunset — varies continuously throughout the year and with latitude. At the equinoxes (around 20 March and 22 September), every location on Earth experiences approximately 12 hours of daylight, though atmospheric refraction means actual day length is slightly longer than 12 hours everywhere. At the summer solstice (around 21 June in the northern hemisphere), locations near 50°N have around 16–17 hours of daylight. At the winter solstice (around 21 December), the same location has only 7–8 hours of daylight. The equator has relatively little seasonal variation, while the poles experience the most extreme range.
How to Use This Tool
Enter the latitude and longitude of your location in decimal degrees. Positive latitude values are north of the equator; negative are south. Positive longitude values are east of the prime meridian; negative are west. If you do not know your coordinates, click Use My Location to allow the browser to provide them automatically from your device's GPS or network location. Select a date using the date picker — today's date is pre-filled by default. Choose your UTC offset from the dropdown to display times in your local timezone. Click Calculate to see results. The output shows sunrise, solar noon, sunset, day length, and all three twilight periods. Click Copy to copy the results as plain text.
Frequently Asked Questions
Yes, Sunrise Sunset Calculator is totally free :)
Yes, you can install the webapp as PWA.
Yes, any data related to Sunrise Sunset Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.
The Sunrise Sunset Calculator computes the sunrise time, sunset time, solar noon, day length, and civil, nautical, and astronomical twilight times for any location on Earth on any date. Enter the latitude, longitude, and a UTC offset, and the tool instantly returns all solar events using the NOAA solar calculation algorithms.
Solar noon is the moment when the sun reaches its highest point in the sky for a given location on a given day. It is not the same as 12:00 pm clock time because of the equation of time (the sun runs ahead or behind by up to 16 minutes across the year) and the difference between your longitude and your time zone's standard meridian. Day length is symmetric around solar noon — sunrise and sunset are each exactly half the day length before and after solar noon.
Twilight describes the period of partial illumination before sunrise and after sunset. Civil twilight occurs when the sun is between 0° and 6° below the horizon — enough light for outdoor activities without artificial lighting. Nautical twilight (6°–12° below horizon) provides enough light for sailors to see the horizon. Astronomical twilight (12°–18° below horizon) is when the sky is dark enough for astronomical observations; below 18°, the sky is considered fully dark.
At high latitudes, the sun can remain continuously above or below the horizon for extended periods. Polar day (midnight sun) occurs when the sun stays above the horizon for more than 24 hours — for example, at the Arctic Circle in mid-summer. Polar night occurs when the sun stays below the horizon for more than 24 hours — at the Arctic Circle in mid-winter. If a polar condition is detected for your location and date, the tool will indicate this instead of showing times.
The calculator uses the NOAA solar algorithm based on Jean Meeus's 'Astronomical Algorithms', which models the sun's position accurate to within a fraction of a degree. Results are typically accurate to within 1–2 minutes of the actual solar event time. Minor variations can occur due to local atmospheric refraction, elevation above sea level, and the horizon profile (mountains or tall buildings).
Solar event times are calculated in UTC (Coordinated Universal Time) and then converted to local time using the UTC offset you specify. Because the tool cannot automatically determine your location's current timezone (which may also change with daylight saving time), you must set the offset manually. For example, if you are in UTC+5:30 (India), all times will be displayed in that offset's local time.