Solar Daylight Hours Calculator
Calculate daylight hours for any latitude and day of the year. Free solar day-length calculator with declination, sun altitude, sunrise and sunset, and twilight.
https://hexacalculator.com/calculators/physics/engineering/solar-daylight-hours-calculator
Physics
Engineering
Solar Daylight Hours Calculator
Calculate daylight hours for any latitude and day of the year. Free solar day-length calculator with declination, sun altitude, sunrise and sunset, and twilight.
Solar Daylight Hours Calculator
Enter your latitude to see the daylight hours. Use a positive value north of the equator and a negative value south of it.
Include twilight (dawn and dusk)
Add civil, nautical, and astronomical twilight day lengths.
Please input values into the fields
- Solar declination
- deg (°)
- Day of the year
Was this calculator helpful?
It takes one click and shapes what we fix next.
Add as preferred on GoogleShow the year-round daylight chart
Plot daylight across all 365 days at your latitude.
Compare other latitudes
Daylight on this date at the equator, tropics, mid-latitudes, and the Arctic Circle.
Show the equinox and solstice table
Daylight at the spring equinox, summer solstice, autumn equinox, and winter solstice.
Near the poles summer seems endless while in winter the sun barely rises above the horizon. The length of day is determined by two factors; where on Earth you are and the position of the Earth in its orbit around the Sun. This calculator computes the expected sunlight duration based on these two values, namely latitude and date. Solar panel installers, gardeners, photographers and pilots all use these same values when planning their activities.
What is sunlight duration?
The solar duration is the length of time on a given day at a particular geographic latitude that the sun is above the horizon. As sunrise and sunset are defined as the times when the center of the Sun crosses the plane of the horizon, it does not include atmospheric effects or twilight. This provides clear geometric reference values for solar engineering and sunlight research.
This value varies greatly over the course of a year. Near the equator, daily sunlight duration is about 12 hours. The further you go towards either pole, the greater this variation becomes; in mid-summer it can be as much as 24 hours of sunlight while in mid-winter it can drop to zero. The tilt of Earth's axis by 23.45 degrees is responsible for this entire cycle.
How to use this calculator:
Enter the latitude in degrees (positive for N hemisphere, negative for S hemisphere). Select the date of the month you want information for and this calculator will calculate what day of the year it is. It then displays the length of daylight hours, solar declination for that day, length of night, height of sun at noon, and sunrise and sunset times.
If the Twilight Times option is enabled, you can add additional times for Morning Twilight, Nautical Twilight and Astronomical Twilight. The Year Graph shows how daily sunshine duration changes over 365 days of a year at your latitude. The Comparison Bar Chart shows what happens from equator to arctic on that same day. The Key Data Table lists the Spring Equinox, Autumn Equinox, Winter Solstice and Summer Solstice.
Understanding of formula.
The length of sunshine is calculated from the hour angle of sunset, which is the amount that the Earth rotates between noon and when the sun reaches the horizon.
Here N is the sunlight duration (in hours), phi represents the geographic latitude and delta the declination of the sun. The factor resulting from dividing 2 by 15 comes from the Earth's rotation. As the Earth rotates through 360 degrees in 24 hours, a rotation of 15 degrees corresponds to one hour, and 2 calculates the two halves of the day, namely morning and afternoon.
The declination is the angle between the sun's rays and Earth's axis, which depends only on the day of the year and is designated here by n.
For example, take the city of London at a latitude of 51.5 degrees on the summer solstice (day 172). The declination will be about +23.45 degrees. Since the tangent of 51.5 degrees is approximately 1.257 and the tangent of 23.45 degrees is approximately 0.434, their product is 0.545. If we put a minus sign in front of this number and apply the inverse cosine function, we get about 123 degrees. Dividing 2 by 15 gives us about 16.4 hours. This is close to 16 hours and 24 minutes. This is the length of the longest day in London.
The summary of input and output is as follows:
Symbol | Meaning | Example |
|---|---|---|
phi | Latitude in degrees | 51.5 |
n | Day of the year | 172 |
delta | Solar declination | +23.45 degrees |
N | Daylight length | 16.4 hours |
How many days have passed in a year?
If you want to enter any date, the calculation tool will convert the day into a month date. These reference points help verify that the seasons are correct and allow you to better interpret the annual charts.
Date | Day of year | What happens |
|---|---|---|
January 1 | 1 | Near the December solstice |
March 20 | 80 | Spring equinox, declination near zero |
June 21 | 172 | Summer solstice, longest northern day |
September 22 | 266 | Autumn equinox, declination near zero |
December 21 | 355 | Winter solstice, shortest northern day |
The importance of sunlight.
The solar planners consider the sunshine duration as the maximum time during which the panels can work effectively. Depending on weather conditions and the angle of the panels, it depends how much this maximum value is actually achieved by the system. As no plant can collect energy after sunset, both capacity planning and battery capacity design start with this value.
Farmers also carefully monitor day length. Plants that require long days (such as spinach and lettuce) will only flower when the day length exceeds a certain threshold. In contrast, plants that prefer short days (such as soybeans) will only flower when the day length falls below this threshold. Lighting in greenhouses is adjusted according to these differences. Architects use day length for building orientation and install windows or skylights in regions with low winter sunlight to let natural light into buildings.
Special cases you should know about:
At the spring and autumn equinoxes, declination is zero, simplifying the formula to exactly 12 hours. On these days, latitude no longer has any effect. In regions within the Arctic Circle, whose latitudes exceed about 66.5 degrees, the input value for the inverse cosine can fall outside of the range from -1 to 1. A value less than or equal to -1 means that the sun never sets and the length of daylight is 24 hours. A value greater than or equal to 1 means that the sun never rises, so it's polar night. Because this calculator limits the input range, in such cases no error message will be displayed, but instead a clear "0" or "24" will be shown.
Frequently asked questions
Does this calculator include twilight?
The main values do not include twilight. They measure the time between geometric sunrise and sunset, i.e. when the center of the sun is on the horizon. By activating the "twilight" option you can add the times for civil twilight, nautical twilight and astronomical twilight. These times extend the available light before sunrise and after sunset.
Why are time zones and longitude ignored?
The length of daylight is determined by latitude and date, not time or east-west position. While the actual times of sunrise and sunset shown on a wall clock vary from one time zone to another, the difference between those times remains constant. The times for sunrise and sunset shown here are based on local solar time with noon defined as when the sun reaches its highest point in the sky.
How accurate is the model with a declination of 23.45 degrees?
For most days the difference between calculated and actual sunlight duration is within a few minutes. As this model does not take into account the eccentricity of Earth's orbit or average solar time differences it can be off by up to about 15 minutes near the winter and summer solstices. Still, it is a standard approximation model used in solar engineering.
What do I need to enter for Southern Hemisphere?
Use a negative latitude for the Southern Hemisphere. For example, Sydney is located at approximately -33.9 degrees latitude. This formula works for both the Northern and Southern Hemispheres, so during the December solstice it will be the longest day of the year in the Southern Hemisphere and the shortest day in the Northern Hemisphere.
Can you get sunrise and sunset times from here?
You can determine the solar time. The sunrise time is half of the daily sunshine duration before noon and the sunset time is the same amount after noon. To convert this to clock time also requires the corresponding longitude, the time zone offset and the equation of time.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- NOAA Global Monitoring Laboratory: Solar Calculator
Reference implementation of solar position and sunrise/sunset math.
- Duffie and Beckman, Solar Engineering of Thermal Processes
Standard derivation of the sunset hour angle and day-length equation.