Daylight Hours (Sunrise / Sunset) Calculator
Enter a latitude, longitude, date and timezone offset to instantly see the local sunrise, solar noon, sunset and total daylight for that day. The math is NOAA's truncated Spencer (1971) Fourier series with the standard 0.833° refraction + solar-disc correction. Accuracy is typically within ±1 minute at temperate latitudes; inside the polar circles the tool flags polar day (midnight sun) or polar night.
Please enter a valid number
Sunrise
04:09
Solar noon
11:57
Sunset
19:44
Daylight
15h 35m
Uses the NOAA solar position formula (0.833° refraction included). Accurate to ~1 minute at temperate latitudes.
Formula
γ = 2π · (doy − 1 + 0.5) / days_in_year EqT = 229.18 · (0.000075 + 0.001868·cos γ − 0.032077·sin γ − 0.014615·cos 2γ − 0.040849·sin 2γ) (minutes) δ = 0.006918 − 0.399912·cos γ + 0.070257·sin γ − 0.006758·cos 2γ + 0.000907·sin 2γ − 0.002697·cos 3γ + 0.001480·sin 3γ (radians) cos H = (cos 90.833° − sin φ · sin δ) / (cos φ · cos δ) Daylight (min) = 8 · H°; sunrise UTC = 720 − 4·(λ + H°) − EqT; sunset UTC = 720 − 4·(λ − H°) − EqT
- · φ is the observer latitude (north positive, south negative), λ is the longitude (east positive, west negative), δ is the solar declination, H° is the hour angle in degrees and EqT is the equation of time in minutes.
- · The 90.833° zenith equals 90° + 0.833° (≈ 0.567° atmospheric refraction at the horizon + 0.267° solar disc radius), so the result is the moment the sun's upper limb crosses the horizon — the same definition used by every almanac.
- · Calculations are per calendar day and ignore daylight saving transitions. If a DST change happens on the chosen date, enter the offset for the time of day you care about.
- · Inside the polar circles cos H falls outside ±1: above +1 means polar night (no sunrise), below −1 means polar day / midnight sun. The widget banners both cases instead of returning bogus times.
- · The Spencer truncated series is accurate to ~1 minute in temperate latitudes and ~3–5 minutes near the polar circles. For navigation or formal astronomy use the USNO or HM Nautical Almanac tables.
- · Sources: NOAA Earth System Research Laboratory Solar Position Calculator, Spencer J. W. (1971) "Fourier series representation of the position of the sun", Meeus J. (1998) "Astronomical Algorithms" (2nd ed., Willmann-Bell).
Frequently asked
Why is daylight not exactly 12 hours on the equinox?
Two reasons. First, sunrise is defined as the moment the upper limb of the sun (not its centre) touches the horizon, so it happens a few minutes earlier — and sunset later — adding roughly the 0.267° solar-radius span of time on each end. Second, the atmosphere refracts the sun's image so the disc appears above the horizon when it is geometrically about 0.567° below it. The combined 0.833° zenith correction makes equinox daylight at the equator closer to 12 h 7 m, and the bonus grows with latitude.
What does "polar day" or "polar night" mean in the result?
At latitudes above roughly 66.56° (66°34′), there is a stretch around the winter solstice where the sun never rises — that is polar night — and a stretch around the summer solstice where it never sets — polar day / the midnight sun. Mathematically, the inverse cosine for the hour angle falls outside ±1, so the algorithm reports "no sunrise/sunset" rather than fabricating a time. The widget shows a banner for both cases.
How does daylight saving time affect the result?
The NOAA formula outputs UTC; adding your timezone offset converts it to local clock time. If the location observes DST, just enter the offset for the period you want (e.g. London BST = UTC+1, New York EDT = UTC−4). The widget deliberately does not include a timezone database, which avoids the classic "sunrise off by an hour on the day of the DST switch" bug.
Where can I look up accurate latitude and longitude?
The easiest path is Google Maps: find the location and right-click (long-press on mobile) — the popup shows decimal coordinates like "22.3193, 114.1694". Most Wikipedia infoboxes, Wikimapia and OpenStreetMap also expose decimal-degree coordinates. Remember: longitude is east positive (New York ≈ −74.0) and latitude is north positive (Sydney ≈ −33.87), matching ISO 6709 and the input fields in this widget.
Related tools
Age Calculator
From your date of birth, get exact age, Chinese nominal age (虛歲), days lived and days to next birthday.
Date Difference Calculator
Enter any two dates to get the calendar gap, working days, weekend days, plus year/month/day breakdown and total weeks/months.
Time Zone Converter
Pick your local and target cities to convert a given clock time across time zones.
Date Add / Subtract Calculator
Add or subtract years, months, weeks and days from a start date to get the resulting date and weekday.
Business Days Calculator
Count the working days between two dates (excluding weekends) — or add N business days to a start date to find the deadline.
Pregnancy Due Date Calculator
Estimate the due date from your last menstrual period (LMP) using Naegele's rule, plus current gestational week, trimester and key pregnancy milestones.
Time Card Calculator (clock-in / clock-out / break)
Enter clock-in/clock-out times and break minutes to get total hours worked and gross pay — overnight (graveyard) shifts handled automatically.
Day of Year & Week Number Calculator
Pick any date to see which day of the year (1–366), ISO 8601 week number, weekday, and how many days from the start and end of the year.
Day of the Week Calculator (Any Date)
Enter any Gregorian date (past or future) to instantly find the day of the week — useful for birthdays, anniversaries and historical events.
Unix Timestamp ↔ Date Converter
Convert a Unix timestamp (seconds or milliseconds since 1970-01-01 UTC) to UTC, Hong Kong time and RFC 1123 HTTP date — and back. Built for debugging log files, API responses and database fields.
Easter Date Calculator
Pick a year and the Computus algorithm returns Easter Sunday plus Ash Wednesday, Palm Sunday and Good Friday.
Moon Phase Calculator
Enter any date to compute the lunar phase (new, first quarter, full, last quarter …), moon age in days and illuminated fraction.
Chinese Zodiac & Lunar Age Calculator
Find your Chinese zodiac animal, stem-branch element, zodiac year and lunar (nominal) age from any birth date.
Western Zodiac Sign Calculator
Enter your birth date to see your Western zodiac sign (Aries, Taurus, Gemini…) along with its element, modality and opposing sign.
Birthstone Calculator
Pick a birth month to instantly see the modern and traditional birthstones, the birth flower, the spanning zodiac signs and a colour swatch — handy when choosing jewellery or birthday gifts.
Julian Day Number Calculator
Convert a Gregorian calendar date to its Julian Day Number (JDN) and Modified Julian Day (MJD) — used in astronomy, history, and cross-calendar date math.
ISO 8601 Week Number Calculator
Enter any date and compute its ISO 8601 week number, ISO year and weekday — using the Monday-first / first-week-contains-Jan-4 rule.
Time Between Two Times Calculator
Enter two clock times (HH:MM[:SS]) and instantly see the difference in hours, minutes and seconds — with overnight-shift handling and decimal-hour output.
Hong Kong Statutory Annual Leave Calculator
Enter years of service and see the statutory paid annual leave entitlement under the HK Employment Ordinance §41AA.
Half-Birthday Calculator
Enter your date of birth to see when your next half-birthday falls, how many days away it is, and your current half-age (e.g. 33.5 years).