This calculator estimates the number of daylight hours (photoperiod) between sunrise and sunset for any latitude and day of the year. It uses standard solar geometry to approximate how long the Sun stays above the ideal horizon, assuming a clear, unobstructed view of the sky.
You can use the results to compare seasons, understand how daylight changes with latitude, or get a first-pass estimate for planning gardening, outdoor work, or solar energy production. For precise legal sunrise/sunset times at a specific address, you should still rely on an astronomical or weather service.
The calculation is based on the tilt of Earth’s axis (about 23.45°) and Earth’s position in its orbit. Two angles are central to the model:
A commonly used approximation for solar declination in degrees, as a function of day-of-year (1–366), is:
This captures the yearly swing of the Sun’s apparent path: is positive when the Sun is north of the Equator (Northern Hemisphere summer) and negative when it is south (Northern Hemisphere winter).
Once is known, we find the sunrise hour angle , which represents the angular distance the Earth rotates between solar noon and sunrise (or sunset). In an idealized model:
The hour angle is measured in degrees. If we convert this rotation to time, we obtain the photoperiod , the total hours of daylight:
The factor appears because:
Near the poles, the expression can fall outside the range . In that case, the model predicts either continuous day (24 hours of sun above the horizon) or continuous night (0 hours of sun). The calculator detects these conditions and reports 24 h or 0 h accordingly.
The output is the idealized number of daylight hours for your chosen latitude and day-of-year. Some ways to interpret the value:
Remember that this is a geometric model at sea level with a flat horizon. Real-world sunrise and sunset can differ by several minutes because of refraction, terrain, and atmospheric conditions.
Suppose you want to estimate the daylight hours in Berlin, Germany (about 52.5° N) on the June solstice (around day-of-year ).
A typical astronomy table for Berlin confirms that late June daylight is about 16.5–16.8 hours, showing that this simple model provides a good first approximation.
The table below compares idealized daylight lengths at the June and December solstices for different latitudes. Values are rounded and may differ slightly from the calculator output because of rounding and model choices.
| Latitude | June solstice daylight (h) | December solstice daylight (h) | Seasonal context |
|---|---|---|---|
| 0° (Equator) | ≈ 12.1 | ≈ 12.1 | Nearly equal day and night all year |
| 30° N | ≈ 14.4 | ≈ 9.8 | Subtropical locations with noticeable seasons |
| 50° N | ≈ 16.4 | ≈ 7.9 | High-latitude regions with long summer days and short winter days |
| 66.5° N (Arctic Circle) | 24.0 | 0.0 | Experiencing midnight sun in summer and polar night in winter |
| 35° S | ≈ 9.7 | ≈ 14.5 | Southern mid-latitudes with seasons opposite to the Northern Hemisphere |
Use the calculator to reproduce or refine these values for specific days close to the solstices, or to explore intermediate dates such as the equinoxes (around days 80 and 264).
Because daylight hours change predictably through the year, this calculator can support a range of planning tasks:
For more detailed solar-angle analysis, you can pair this calculator with a solar declination or solar altitude tool to examine how high the Sun gets in the sky for the same dates and locations.
The model behind this calculator uses several simplifying assumptions. These make it fast and easy to use but also explain why it may not match official sunrise/sunset times exactly.
Because of these assumptions, use the results for educational, comparative, or preliminary planning purposes rather than for safety-critical navigation or legal timekeeping.
If you want to go further, consider pairing this daylight hours result with other calculators:
Because Earth’s axis is tilted about 23.45°, your hemisphere leans toward the Sun in its summer and away from the Sun in its winter. When you lean toward the Sun, its apparent path crosses the sky higher and for a longer time, producing longer days. When you lean away, the path is lower and shorter, producing short winter days.
Near the Equator, daylength stays close to 12 hours all year. As you move toward the poles, the seasonal swing increases: summers bring very long days, and winters bring very short days. Above the Arctic and Antarctic Circles, you can experience 24-hour daylight in summer and 24-hour darkness in winter.
Weather and astronomical services include effects such as atmospheric refraction, the finite size of the Sun, local elevation, and detailed Earth-orbit models. This calculator uses a simpler geometric approach that is usually within a few minutes of those values but not identical.
Yes, as a starting point. The calculator tells you how daylight duration changes with season and latitude, which is important for estimating seasonal solar production. For system design, you should combine this with local irradiance data, panel specifications, shading analysis, and, if possible, long-term measurements from your site.