What this calculator does
This tool estimates how a building standing to the south of your home (or to the north, in the Southern Hemisphere) blocks direct sunlight. For a chosen date and latitude it traces the sun across the sky minute by minute and finds the window during which the sun is hidden behind the building's roofline, then reports the residual sunlight hours your windows actually receive. The astronomy is universal, so it works at any latitude and longitude.
How to use it
Enter your latitude (positive north), longitude and timezone offset, then the day of year (Jan 1 = 1). Measure the horizontal distance from your window to the south building and the building's height above your measuring point (subtract the sill height if needed). Leave the half-width at 0 to model an infinitely wide wall, or enter half the east-west extent to account for sun slipping past the building's edges. Longitude, timezone and the equation of time convert apparent solar time to your local clock.
The formula explained
The critical altitude the sun must exceed to clear the roof is \(\theta_C = \arctan\!\left(\frac{\text{Height}}{\text{Distance}}\right)\). Solar elevation is \(\sin\alpha = \sin\phi\,\sin\delta + \cos\phi\,\cos\delta\,\cos H\), where \(\delta\) is the solar declination from a sine approximation and \(H\) is the hour angle (15 degrees per hour from solar noon). A minute counts as blocked when the sun is up, lies within the building's azimuth span, and its altitude is below \(\theta_C\). Summing those minutes gives the blocked hours; daylight length minus blocked hours gives residual sunlight.
Worked example
Latitude 35 degrees, day 81 (declination 0), distance 10 m, height 8 m, infinite wall.
$$\theta_C = \arctan(0.8) = 38.66^\circ$$The sun clears the roof only between about 09:19 and 14:41 solar time, so blocked hours are about 6.63 and residual sunlight about 5.37 of the 12-hour day.
FAQ
Why use height above the window? Only the part of the building above your line of sight casts shade onto the window, so use the roof height minus the sill height.
What about the Southern Hemisphere? Enter a negative latitude; the obstruction-bearing direction becomes north (equator-facing), and the equations still hold.
Are clock times exact? They include longitude and equation-of-time corrections, giving close first-order estimates that ignore refraction, terrain and daylight-saving shifts.