Daylight Calculator - Sunrise And Day Length

Use this daylight calculator with date, latitude, longitude, and UTC offset to estimate sunrise, sunset, solar noon, daylight hours, and polar-day labels.

Updated: June 24, 2026 • Free Tool

Daylight Calculator

Gregorian year. The NOAA spreadsheet approximation is strongest from 1901 through 2099.

Use 1 for January through 12 for December.

Day of month. Invalid dates such as February 30 are rejected.

Degrees north are positive; degrees south are negative.

Degrees east of Greenwich are positive; degrees west are negative.

Enter the local clock offset from UTC, including daylight saving time when it applies.

Results

Daylight Duration
0hours
Hours and Minutes 0
Approx. Sunrise 0
Approx. Sunset 0
Solar Noon 0
Solar Declination 0deg
Equation of Time 0min
Daylight Status 0

What Is the Daylight Calculator?

The daylight calculator estimates how long the Sun is above the apparent horizon for a chosen date and location. Enter the calendar date, latitude, longitude, and UTC offset, and the calculator returns daylight duration, sunrise, sunset, solar noon, solar declination, and a status label for normal sunrise, midnight sun, or polar night.

  • Fieldwork and class planning: Check whether an outdoor lab, survey, observation, or campus event has enough natural light without relying on a city-only almanac.
  • Travel and photography schedules: Compare daylight at a destination before choosing hike start times, photography windows, or evening activities.
  • Season and latitude comparisons: Move the same date between northern and southern latitudes to see how solstice and equinox daylight changes.
  • Polar-region interpretation: Identify dates when the sunrise equation produces no ordinary sunrise or sunset because the Sun stays above or below the horizon.

Use the result as an astronomy and planning estimate, not as a legal sunrise record. A city almanac may include local horizon rules, elevation data, and daylight-saving conventions that a coordinate-only calculator cannot infer.

The duration itself depends on latitude and date. Longitude and UTC offset mainly place sunrise, sunset, and solar noon on the local clock, so two towns on the same latitude can have nearly the same day length while their clock times differ.

That distinction is useful when comparing places. A class can hold the date steady and change only latitude to see the seasonal effect, then hold latitude steady and change longitude to see why the same daylight span appears earlier or later on a clock.

When you need the star-clock version of the same sky-position problem, Sidereal Time Calculator compares Earth's rotation against the stars instead of the Sun.

How the Daylight Calculator Works

The calculator follows NOAA-style solar-position equations. First it converts the date to day of year and fractional year, then estimates the equation of time and solar declination. Next it solves the sunrise hour angle at the apparent sunrise/sunset zenith and converts that angle into hours of daylight.

daylight hours = 2 * arccos(cos(90.833 deg)/(cos latitude * cos declination) - tan latitude * tan declination) / 15 deg per hour
  • latitude: Observer latitude in degrees. Positive values are north of the equator and negative values are south.
  • solar declination: The Sun's angular position north or south of Earth's equator for the selected day.
  • 90.833 degrees: The apparent sunrise/sunset zenith used to include an approximate correction for atmospheric refraction and the Sun's disk.
  • hour angle: The angular distance between solar noon and sunrise or sunset. Earth turns about 15 degrees per hour, so the hour angle converts directly to time.

If the inverse-cosine argument is between -1 and 1, the result has one ordinary sunrise and one ordinary sunset. If the argument is below -1, the selected location is in continuous daylight for that date. If it is above 1, the result is polar night.

The equation uses an apparent horizon, so the number is closer to common almanac sunrise than to a center-of-Sun geometric crossing. It still assumes a flat, unobstructed horizon; terrain and high viewpoints can shift direct sunlight by minutes.

For clock times, longitude and equation of time place solar noon in UTC minutes, and the UTC offset moves that value to local civil time. Enter daylight saving time in the UTC offset yourself when the location observes it.

New York City on June 21, 2026

year = 2026, month = 6, day = 21, latitude = 40.7128, longitude = -74.006, UTC offset = -4

NOAA equations give solar declination about 23.45 degrees, equation of time about -1.33 minutes, and an apparent sunrise hour angle about 113.22 degrees.

Daylight duration is 15.10 hours, or about 15 hr 6 min, with approximate local sunrise at 5:24 AM and sunset at 8:30 PM.

The long day comes from a positive solar declination near the Northern Hemisphere summer solstice.

According to U.S. Naval Observatory Rise, Set, and Twilight Definitions, computational sunrise and sunset occur when the Sun's center has a geometric zenith distance of 90.8333 degrees.

According to U.S. Naval Observatory Computing Times of Rise, Set, and Twilight, the Explanatory Supplement to the Astronomical Almanac is an authoritative source for methods used to compute rise, set, and transit phenomena.

If your field notes also require compass correction at the same coordinates, Magnetic Declination Calculator handles the north-reference side of location planning.

Key Concepts Explained

Daylight math looks compact, but four astronomy ideas control nearly every result the page returns.

Solar declination

Solar declination is the Sun's apparent latitude on the celestial sphere. It is positive around June solstice, negative around December solstice, and near zero around the equinoxes.

Solar noon

Solar noon is when the Sun crosses the local meridian. It usually does not land exactly at 12:00 PM because longitude within a time zone and the equation of time both shift it.

Apparent sunrise

Apparent sunrise occurs before the Sun's geometric center reaches a flat horizon because refraction bends light and the visible disk has size. The 90.833 degree zenith approximates that effect.

Polar day and polar night

At high latitudes near a solstice, the hour-angle equation may have no normal solution. The calculator then labels the date as midnight sun or polar night instead of forcing a fake clock time.

The equator stays close to a 12-hour day throughout the year, with apparent daylight a little longer because of the sunrise/sunset correction. Higher latitudes swing harder, so the same calendar date can mean very different planning windows in Miami, Oslo, and Sydney.

The concept cards are also a checklist for auditing an unusual answer. If daylight duration looks plausible but solar noon appears far from midday, check longitude and UTC offset first. If duration itself looks surprising, compare the latitude and solar declination signs; opposite signs usually mean winter-like daylight for that hemisphere.

For night observations after sunset, Moon Phase Calculator adds the lunar-calendar context that daylight duration alone cannot provide.

How to Use This Calculator

Use real coordinates and the correct civil-time offset for the date you care about. That is especially important near time-zone borders and during daylight saving time.

  1. 1 Enter the date: Type the year, month, and day. The calculator checks leap years and rejects impossible dates.
  2. 2 Enter latitude: Use positive degrees for north latitude and negative degrees for south latitude.
  3. 3 Enter longitude: Use positive degrees east of Greenwich and negative degrees west of Greenwich.
  4. 4 Set UTC offset: Use the local clock offset for that date, such as -4 for Eastern Daylight Time or -5 for Eastern Standard Time.
  5. 5 Read the status label: Normal means the sunrise and sunset times are usable estimates; midnight sun and polar night mean ordinary times do not exist for the selected date.
  6. 6 Apply the caveats: Adjust your plan if mountains, buildings, elevation, weather, or a legal sunrise definition matters.

For a summer outdoor lab in New York, use the daylight calculator with 2026-06-21, latitude 40.7128, longitude -74.006, and UTC offset -4. The result gives about 15 hr 6 min of daylight, so a 7 PM field session still has natural light but is close enough to sunset that backup lighting may be sensible.

For a winter comparison, keep the New York coordinates and change the date to 2026-12-21 with UTC offset -5. The result drops to a little over 9 hours, which explains why field courses and solar demonstrations need a larger December buffer.

Greenhouse and plant-light users can pair the day-length result with Daily Light Integral DLI Calculator to translate light duration and intensity into plant exposure.

Benefits of Using This Calculator

A coordinate-based daylight result helps when a broad city lookup is too coarse or when you want to compare several dates quickly.

  • Plan outdoor work with a real daylight window: The hours-and-minutes output gives a practical span for surveys, photography, field classes, or site visits.
  • Separate duration from clock time: Daylight duration is driven by date and latitude, while longitude and UTC offset explain why the clock times shift.
  • Spot polar edge cases: The status label prevents misleading sunrise or sunset times when the Sun never rises or never sets.
  • Teach the formula inputs: Solar declination and equation-of-time outputs make the result easier to audit in astronomy, geography, and physics lessons.
  • Compare seasons without changing tools: Move the same coordinates from March to June to December and see how the day-length curve changes.

The calculator is useful for sanity checks. If a result shows a very late solar noon, the longitude and time-zone pairing probably deserves a second look before you use the sunrise and sunset times in a schedule.

Because the output includes both duration and clock times, it can separate two common questions. "How much light is available?" is answered by daylight hours. "When does that light fall during the day?" is answered by sunrise, sunset, and solar noon. Keeping those answers separate helps prevent schedule mistakes near the edge of a time zone.

When the daylight window becomes an outdoor exposure plan, Sunscreen Calculator helps size the UV side of the same day.

Factors That Affect Your Results

The formula is deterministic, but the real horizon is not. These factors explain why an observed sunrise can differ from the calculated clock time.

Latitude

Latitude controls the seasonal swing. Higher absolute latitudes produce longer summer days, shorter winter days, and eventually polar-day cases.

Date and leap year

The day of year controls solar declination. Leap years use 366 in the fractional-year denominator, which slightly changes the daily angle.

Longitude and UTC offset

These do not change the physical length of daylight at a fixed latitude, but they move sunrise, sunset, and solar noon on the clock.

Atmosphere and horizon

Refraction, pressure, humidity, terrain, and buildings can shift the observed first or last direct sunlight by minutes.

  • The page assumes a standard apparent horizon and NOAA's 90.833 degree correction; it does not model elevation, mountain skylines, sea-level dip, or local obstructions.
  • For civil decisions, legal records, aviation, litigation, and safety-critical work, use the relevant official almanac or agency source instead of a general web calculator.
  • Time-zone rules are not inferred automatically. Enter the UTC offset for the actual date, including daylight saving time where it applies.

NOAA's published caveats matter most near the poles, where the Sun meets the horizon at a shallow angle and small atmospheric differences can create larger timing differences.

Time-zone handling is another practical limit. The calculator accepts a UTC offset because the offset is a civil rule, not an astronomy result. If a location changed daylight-saving rules, or if a historical date used a different standard offset, verify the local offset before treating the displayed clock times as a planning reference.

According to U.S. Naval Observatory Duration of Daylight/Darkness Table, its data services include a Duration of Daylight and Darkness Table for one year.

If the clock offset is the uncertain input, Time Zone Converter is the closer companion check before comparing sunrise and sunset across cities.

daylight calculator featured image with a horizon, sunrise and sunset markers, coordinates, and a daylight duration readout
daylight calculator featured image with a horizon, sunrise and sunset markers, coordinates, and a daylight duration readout

Frequently Asked Questions

Q: How do you calculate daylight hours?

Calculate solar declination for the date, solve the apparent sunrise hour angle for the latitude, then double that angle and divide by 15 degrees per hour. The calculator also handles polar day and polar night when the inverse-cosine step has no normal solution.

Q: Why is daylight longer in summer?

Earth's tilted axis makes the Sun's declination move north and south through the year. When your hemisphere tilts toward the Sun, the Sun spends a longer arc above the horizon, so sunrise comes earlier and sunset comes later.

Q: Does longitude change the length of daylight?

Longitude mainly changes the clock times for sunrise, sunset, and solar noon. At a fixed latitude on the same date, daylight duration is nearly the same, but local clock times shift because longitude changes where the Sun is relative to the time zone.

Q: What does 90.833 degrees mean in this calculator?

NOAA uses 90.833 degrees as the apparent sunrise and sunset zenith. It adds about 0.833 degrees beyond a geometric horizon to account for atmospheric refraction and the Sun's visible disk, so daylight is slightly longer than center-of-Sun geometry alone.

Q: Why does the result show midnight sun or polar night?

At high latitudes near a solstice, the Sun can stay above or below the horizon for the whole civil day. In those cases the sunrise equation does not produce ordinary sunrise and sunset times, so the calculator returns 24 or 0 daylight hours.

Q: How accurate are the sunrise and sunset times?

For ordinary planning, the estimates are usually close enough to choose a schedule. NOAA notes that atmosphere, temperature, pressure, humidity, and high-latitude geometry can shift observed sunrise or sunset, so do not use this result as a certified record.