Sunrise Sunset Calculator
Calculate sunrise, sunset, and daylight hours for any location and date on Earth. Enter values for instant results with step-by-step formulas.
Calculator
Adjust values & calculateGolden Hour (Photography)
Twilight Times (UTC)
Formula
The sunrise/sunset hour angle is computed from the observer's latitude and the Sun's declination. The -0.833° accounts for atmospheric refraction (0.567°) and the Sun's apparent radius (0.266°). Solar declination is derived from the ecliptic longitude, which depends on the date via the solar mean anomaly and equation of center.
Last reviewed: December 2025
Worked Examples
Example 1: Summer Day in New York
Example 2: Winter in London
Background & Theory
The Sunrise Sunset Calculator applies the following established principles and formulas. Astronomy and space science rely on a set of precisely defined physical relationships that allow distances, sizes, motions, and energies of celestial objects to be calculated from observational data. Kepler's three laws of planetary motion, derived empirically in the early seventeenth century, describe elliptical orbits, equal areas swept in equal times, and the harmonic law T² = a³, where T is the orbital period in Earth years and a is the semi-major axis in astronomical units (AU). This relationship holds for any object orbiting the Sun and can be generalized using Newton's law of gravitation. Distances in astronomy are expressed in multiple units: one light-year equals approximately 9.461 × 10¹⁵ meters, one parsec equals 3.086 × 10¹⁶ meters or about 3.26 light-years, defined as the distance at which one AU subtends one arcsecond of parallax. Angular size is calculated as θ = 206,265 × (d / D) arcseconds, where d is the physical diameter and D is the distance. The stellar magnitude system uses Pogson's formula: m1 − m2 = −2.5 × log10(F1 / F2), where F represents flux. Each magnitude step corresponds to a flux ratio of approximately 2.512, meaning a first-magnitude star is 100 times brighter than a sixth-magnitude star. Hubble's Law relates recessional velocity to distance: v = H₀d, where the Hubble constant H₀ is approximately 70 km/s/Mpc. Escape velocity from any body is given by v = √(2GM/r), yielding 11.2 km/s for Earth. Orbital period for a circular orbit follows T = 2π√(r³/GM). Luminosity and distance are linked by the inverse square law: F = L / (4πd²). Stars are classified by spectral type using the mnemonic OBAFGKM, corresponding to surface temperatures from approximately 30,000 K (O-type) to under 3,500 K (M-type). Each type reflects characteristic absorption spectra tied to ionization states of elements in the stellar photosphere.
History
The history behind the Sunrise Sunset Calculator traces back through the following developments. The history of astronomy is one of progressive scale — each era expanding humanity's conception of the universe's size and structure. The Copernican revolution of 1543, when Nicolaus Copernicus published De revolutionibus orbium coelestium, displaced Earth from the center of the cosmos and placed the Sun at the center of the planetary system. Decades later, Galileo Galilei turned a Dutch-invented telescope toward the sky in 1609, discovering the moons of Jupiter, the phases of Venus, and the cratered surface of the Moon — observations that provided compelling evidence for the heliocentric model and led to his conflict with the Catholic Church. Johannes Kepler, working from Tycho Brahe's meticulous naked-eye observations, derived his three laws of planetary motion between 1609 and 1619. Isaac Newton unified celestial and terrestrial mechanics with his law of universal gravitation in 1687, explaining the cause behind Kepler's empirical laws and enabling precise prediction of planetary positions. The eighteenth and nineteenth centuries brought systematic sky surveys, stellar parallax measurements, and the discovery that the Milky Way is itself a galaxy among many. Edwin Hubble's 1929 observations using the 100-inch Hooker Telescope at Mount Wilson demonstrated that galaxies are receding from us at velocities proportional to their distance — the first direct evidence for an expanding universe and the empirical basis for Big Bang cosmology. NASA was founded in 1958 following the Sputnik shock, and the Apollo 11 mission landed humans on the Moon on July 20, 1969. The Hubble Space Telescope, launched in 1990, revolutionized observational astronomy by operating above Earth's atmosphere and producing imagery from ultraviolet to near-infrared wavelengths. The first confirmed exoplanet around a Sun-like star was detected in 1995 by Michel Mayor and Didier Queloz using the radial velocity method. The James Webb Space Telescope, launched in December 2021 and fully operational by 2022, extended infrared observations to probe the earliest galaxies formed after the Big Bang.
Frequently Asked Questions
Sources & References
Formula
Hour Angle = arccos((sin(-0.833°) - sin(lat) × sin(dec)) / (cos(lat) × cos(dec)))
The sunrise/sunset hour angle is computed from the observer's latitude and the Sun's declination. The -0.833° accounts for atmospheric refraction (0.567°) and the Sun's apparent radius (0.266°). Solar declination is derived from the ecliptic longitude, which depends on the date via the solar mean anomaly and equation of center.
Worked Examples
Example 1: Summer Day in New York
Problem: Find sunrise and sunset for New York City (40.71°N, 74.01°W) on June 21.
Solution: Using solar position calculations:\nSolar declination ≈ +23.44°\nHour angle ≈ 112.8°\nSunrise ≈ 05:25 UTC (local 01:25 EDT → adjusted)\nDaylight ≈ 15.05 hours
Result: Sunrise: ~05:25, Sunset: ~20:31 (UTC) — approximately 15 hours of daylight
Example 2: Winter in London
Problem: Find sunrise and sunset for London (51.51°N, 0.13°W) on December 21.
Solution: Solar declination ≈ -23.44°\nAt 51.5°N with negative declination, very short day\nDaylight ≈ 7.9 hours
Result: Sunrise: ~08:04, Sunset: ~15:53 (UTC) — approximately 7.9 hours of daylight
Frequently Asked Questions
How are sunrise and sunset times calculated?
Sunrise and sunset are calculated using the sun's position relative to the observer. The algorithm computes the Julian date, solar mean anomaly, equation of center, ecliptic longitude, solar declination, and hour angle. Sunrise occurs when the sun's center is 0.833° below the horizon (accounting for atmospheric refraction of 0.567° and the sun's apparent radius of 0.266°). These calculations use the NOAA solar position algorithm, accurate to within 1-2 minutes.
How do I get the most accurate result?
Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.
Can I use the results for professional or academic purposes?
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
How accurate are the results from Sunrise Sunset Calculator?
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
Why might my result differ from another tool or reference?
Differences typically arise from rounding conventions, the specific version of a formula (for example, simple vs compound interest), or unit inconsistencies between inputs. Check that both tools are using the same formula variant and the same units. The References section links to the authoritative source behind the formula used here.
Can I use Sunrise Sunset Calculator on a mobile device?
Yes. All calculators on NovaCalculator are fully responsive and work on smartphones, tablets, and desktops. The layout adapts automatically to your screen size.
References
Reviewed by Daniel Agrici, Founder & Lead Developer · Editorial policy