Skip to main content
Date & Time

Sunrise & Sunset Calculator

Enter latitude, longitude, date and timezone offset; the tool runs the NOAA / Jean Meeus solar-position algorithm (*Astronomical Algorithms*, 2nd ed.) and returns sunrise, sunset, solar noon and day length, plus the day's solar declination (δ) and equation of time (E). A 90.833° zenith accounts for atmospheric refraction (~34′) and the apparent radius of the solar disk (~16′). Accuracy is ~1 minute for latitudes below 72° and years 1800–2200. Useful for photographers, hikers, solar-panel alignment, gardeners, astrologers and amateur astronomers.

Sunrise

05:39

Solar noon

12:24

Sunset

19:10

Day length

13h 31m

Solar declination

23.4°

Equation of time E

−1.5 min

NOAA / Jean Meeus solar-position algorithm (Astronomical Algorithms, 2nd ed.). Accounts for atmospheric refraction (~34′) and the apparent radius of the solar disk (~16′) at a 90.833° zenith. Accuracy ~1 minute for latitudes below 72° and years 1800–2200.

Formula

JD = Gregorian Julian Date; T = (JD − 2451545) ⁄ 36525 λ_sun ≈ L₀ + C − 0.00569 − 0.00478·sin Ω δ = arcsin(sin ε · sin λ_sun) E (min) = 4·rad2deg(y·sin 2L₀ − 2e·sin M + 4ey·sin M·cos 2L₀ − ½y²·sin 4L₀ − 1.25e²·sin 2M), y = tan²(ε ⁄ 2) Hour angle H = arccos((cos 90.833° − sin φ·sin δ) ⁄ (cos φ·cos δ)) Solar noon (UTC, min) = 720 − 4·longitude − E; sunrise / sunset = noon ∓ 4H

Frequently asked

Why do two cities at the same latitude have sunrise / sunset times hours apart?

Two reasons. First, longitude directly maps to time: every 15° of longitude is one hour of solar time. London (0°E) and Moscow (37.6°E) are both near 51°N, but Moscow runs about 2.5 hours ahead by clock; expressed in UTC their sunrise times are roughly 2.5 hours apart — exactly what 37.6° / 15° gives you. Second, civil time zones do not have to follow geography. China spans roughly 60° of longitude but uses a single UTC+8 (Beijing time), so Ürümqi in Xinjiang (87°E) can have a clock-time sunrise as late as 10:00. Spain sits near the prime meridian yet observes UTC+1 (Central European Time), pushing Madrid sunsets to ~21:30 in midsummer — a political-time-zone effect, not an astronomical one. This tool takes longitude and timezone offset as separate inputs so you can isolate the two contributions.

Why are sunrise earliest, sunset latest and the day longest on the summer solstice?

You might expect them all on the same day — but the earliest sunrise and the latest sunset do *not* both fall on the solstice. The longest day does coincide with the solstice (around 21 June in the Northern Hemisphere), because the solar declination δ reaches its maximum (~+23.44°) on that date and so does the geometric hour angle H. But the clock time of sunrise also includes the equation of time E, and E is about −2 to −3 minutes around the June solstice, rising to about +6 minutes by late July. So at northern mid-latitudes (e.g. New York at 41°N) the earliest sunrise lands around 14 June, the latest sunset around 28 June, with the solstice itself in the middle. The longest day is still the solstice. This left-right asymmetry comes from the asymmetric "figure-of-eight" shape of E in the analemma.

Is sunrise defined as the centre of the disk crossing the horizon, or the upper limb crossing?

The standard adopted by the USNO, IAU, NOAA, KMA, HKO and almost every modern almanac is: sunrise / sunset is the moment the *upper limb* of the sun touches the visible horizon. To express this in terms of the sun's centre, add the sun's angular radius (~16′) and the atmospheric refraction near the horizon (~34′) — together ~50′ ≈ 0.833°. So when the geometric centre of the sun is still 0.833° below the horizon, the upper limb is just touching it visually. This tool, like all NOAA / Meeus-based calculators, uses a 90.833° zenith (i.e. a −0.833° solar altitude) as the cut-off. If instead you want the moment the sun's centre crosses the horizon (sometimes called geometric sunrise), use 90°. Civil twilight uses 96° (−6°), nautical twilight 102° (−12°), and astronomical twilight 108° (−18°).

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).

Daylight Hours (Sunrise / Sunset) Calculator

Enter a latitude, longitude and date to get the local sunrise, sunset, solar noon and total daylight hours using the NOAA solar position formula.

Countdown to Date Calculator

Enter a target date and get an instant breakdown of days, weeks, months, hours and minutes remaining — or elapsed for past dates.

Jet Lag Recovery Time Calculator

Enter the number of time zones crossed and direction of travel (eastward or westward) to estimate how many days you typically need to fully adjust to the destination, based on sleep-medicine rules of thumb.

Decimal Hours ↔ HH:MM:SS Converter

Convert between HH:MM:SS and decimal hours both ways — built for payroll, timesheets and lab notebooks.

Generation Calculator (Birth Year)

Enter a birth year to classify yourself by the Pew Research generation cohorts — Greatest, Silent, Boomer, Gen X, Millennial, Gen Z, Gen Alpha or Gen Beta.

Time Adder & Subtractor (HH:MM:SS)

Add or subtract any number of HH:MM:SS durations with automatic carry — handy for totalling video lengths, training sessions or race splits.

Year / Quarter / Month / Week Progress Calculator

Pick any date to see what percentage of the year, quarter, month and week has elapsed and how many days remain — handy for yearly goals, OKR check-ins and progress reports.

Date Format Converter (ISO 8601 / US / EU / JP / Unix)

Pick a date and see it instantly formatted in ISO 8601, RFC 2822, US (MM/DD/YYYY), EU (DD/MM/YYYY), Japanese (YYYY年MM月DD日), Unix timestamp and a dozen other common formats.

Friday the 13th Date Finder

List every Friday the 13th in a given year (or range) and show how many days remain until the next one.

Nth Weekday of the Month Calculator

Pick a month, year, weekday and occurrence (including "last") to get the date — handy for scheduling monthly meetings, paydays and rule-based holidays such as US Thanksgiving (4th Thursday of November).

Weekday Count in Date Range Calculator

Enter a start and end date and instantly see how many Mondays, Tuesdays, … Sundays fall inside the range, plus weekday vs weekend totals — useful for scheduling, payroll, rent and contract counts.

Time to Retirement Calculator

Enter your birth date and target retirement age; the tool returns the exact years, months, days and total days remaining until retirement, plus the calendar date you will retire — useful for financial and life planning.

Fiscal Quarter Calculator (custom fiscal-year start)

Enter a date and your fiscal-year start month; the tool reports the calendar quarter (Q1–Q4), the fiscal quarter and fiscal-year label, the quarter's start/end dates and the percentage of the quarter elapsed — useful for SEC filings, government budgets and SaaS subscription planning.

Working Hours per Year Calculator (with hourly / daily rate)

Enter weekly hours, annual leave days and public holidays; the tool returns net annual working hours after leave and converts a yearly salary into hourly, daily and monthly rates — useful for freelancers, contractors and HR cost planning.