Sunlight Hours Calculator
Calculate day length, sunrise and sunset for any latitude and date.
Last updated · View algorithm, constants and default inputs (JSON)
Results
About this calculator
Estimate daylight from latitude and date. Clock times use your entered fixed offset from solar time and are approximate; the calculator does not determine time zones or daylight-saving changes. The daylight category is based only on day length, not the hemisphere or local season. Usable sun subtracts only the shade hours you enter.
Worked example
calculated with the default values below
Latitude 40 ° (positive north) · Date 2026-10-31 · Clock offset from solar time 0 hours · Hours of daily shade (walls, trees) 0 hours Daylight 10.27 hours · Sunrise 06:52 · Sunset 17:08 · Solar noon 12:00 · Change in daylight per day -2.3 min · Usable direct sun 10.27 hours · Daylight category Moderately short daylight · What this means Daylight is shortening by about 2.3 minutes a day.
General background references
Disclaimer
These are general gardening estimates. Planting windows, growth, water and nutrient needs vary by place and plant. Check local extension guidance and product labels before acting on an estimate.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
δ = −23.44° cos(2π(n+10)÷365); H = 2 acos(−tan φ tan δ) ÷ 15
- n
- Day of year
- φ
- Latitude (degrees)
- δ
- Solar declination
- H
- Day length (hours)
Day length H uses a simplified solar-declination estimate; polar day/night are capped at 24/0 h. Usable sun = max(0, H − entered shade hours); no extra fixed deduction is used. Clock offset shifts displayed clock times only.
Frequently asked questions
What does usable sun subtract from daylight?
It subtracts only the shade hours you enter from the estimated day length, with a minimum of zero. This is a planning estimate and does not model terrain, building shadows or the intensity of sunlight.