Loona Calculators
Loona Calculators › Date & Time › Sunrise & Sunset Calculator

🌅 Sunrise & Sunset Calculator

Enter any date and a location's latitude and longitude to calculate sunrise, sunset, the length of the day and solar noon, using the standard NOAA solar equations. Presets for major cities are included.

Quick answer: Sunrise and sunset are when the sun's upper edge crosses the horizon (zenith 90.833°). London on 21 June 2026: sunrise about 03:43 UTC (04:43 BST) and sunset about 20:21 UTC (21:21 BST) — a day of roughly 16 hours 38 minutes.

How to use the Sunrise & Sunset Calculator

  1. Pick a preset city, or enter latitude (−90 to 90) and longitude (−180 to 180, east positive) yourself.
  2. Choose the date.
  3. Read sunrise, sunset, day length and solar noon in UTC; add your time zone offset to get local clock times.
Example: Karachi (24.86°N, 67.00°E) on 15 January 2026: sunrise about 02:19 UTC = 07:19 local (UTC+5), sunset about 13:04 UTC = 18:04 local — a winter day of about 10 hours 45 minutes.

Frequently Asked Questions

What time standard are the results in?

UTC, so they work for every location without guessing time zones or daylight-saving rules. Add the location's UTC offset for that date (for example +5 for Karachi, +1 for London in summer) to get local clock time.

How accurate is it?

The NOAA/Almanac algorithm used here is typically within about 1–2 minutes of published almanac times at most populated latitudes. At extreme polar latitudes the sun may not rise or set at all on some dates — the calculator reports polar day or polar night honestly.

Why 90.833 degrees and not exactly 90?

Because sunrise/sunset are defined by the sun's upper edge, not its centre, and the atmosphere bends sunlight. The extra 0.833° accounts for the sun's radius (0.25°) plus typical refraction (0.583°).

Where can I get coordinates for my town?

Any map app shows latitude/longitude for a dropped pin. The preset list covers major world and European cities to start from.

Related Calculators

📆

Date Calculator

Date & Time

🗓️

Days Between Dates

Date & Time

📅

Age Calculator

Date & Time

🏢

Working Days Calculator

Date & Time

🌍

World Clock

Date & Time

How it works — the formula

The standard Almanac/NOAA method: from the day of year N and longitude, estimate the sun's mean anomaly M = 0.9856t − 3.289, its true longitude L = M + 1.916 sin M + 0.020 sin 2M + 282.634, right ascension RA, and declination from sin(dec) = 0.39782 sin L. The hour angle H follows from cos H = (cos 90.833° − sin(dec) sin(lat)) ÷ (cos(dec) cos(lat)). Sunrise uses 360° − H, sunset uses H, and local mean time converts to UTC with the longitude. If |cos H| > 1 the sun never sets (polar day) or never rises (polar night) that day.

Worked example

Inputs: London, lat 51.5074, lon −0.1278, 21 Jun 2026 (day N = 172).

Steps: The algorithm gives the sun's declination ≈ +23.43° (near its solstice maximum) and an hour angle of about 125.1°, so the half-day is 125.1 ÷ 15 = 8.34 hours around solar noon. The full computation returns sunrise ≈ 03:43 UTC and sunset ≈ 20:21 UTC (04:43 and 21:21 BST, solar noon ≈ 12:02 UTC = 13:02 BST — the midpoint), matching published London almanac times (timeanddate) for the 2026 solstice.

Result: Day length = 20:21 − 03:43 = 16 h 38 min.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.