Sun Path & Shadow Calculator
Find where the sun is at any hour, how long shadows fall, and how many hours of direct sun a spot gets in each month.
Runs in your browser. Nothing is uploaded.
Place and time
About 1,000 places. For your exact spot, type its coordinates below.
Decimal degrees (51.507, -0.128) or degrees, minutes and seconds (51° 30′ 25″ N) both work.
Set from the city you pick.
UTC offset used: shown once a place is set.
A fence, a pole or a person. The unit also applies to obstacles.
The sun at the chosen time
- —Sun height
- —Direction
- —Shadow length
- —At your spot
Pick a place to see the sun's path.
- Chosen day, with clock hours
- Sun at the chosen time
- 21 June, equinox, 21 December
- Obstacles
- —Sunrise
- —Solar noon
- —Sunset
- —Daylightsunrise to sunset
- —Civil dawnsun 6° below the horizon
- —Civil dusksun 6° below the horizon
- —Direct sun this day
Trees, fences and buildings
Add what stands around your spot. Directions are degrees clockwise from north: 90 is east, 180 south, 270 west.
0 for a garden bed. A balcony is about 3 m per floor up.
No obstacles yet, so the charts show open sky.
An object is a tree, fence or building: its height, distance, direction and width. A skyline is a range of directions blocked up to an angle, such as hills or a row of buildings.
Hours of direct sun by month
| Month | With obstacles (h) | Open sky (h) | Garden label |
|---|
Average per day, counted every 2 minutes. This is clear-sky geometry. Clouds aren't included.
Through the day
| Clock time | Height (°) | Direction (°) | Compass | Shadow (m) | At your spot |
|---|
The CSV has the whole day every 10 minutes, with UTC times. The printable chart shows the 21st of every month with hour lines, sized for A4 or Letter.
How to use
- Type your city and pick it from the list, or type the latitude and longitude of your exact spot.
- Check the time zone, then choose a date and a clock time. Drag the slider to move the sun through the day.
- Read the sun's height and direction, the shadow length, and the times of sunrise, solar noon and sunset.
- Add the trees, fences and buildings around your spot. The sky chart and the monthly hours change as you edit them.
- Download the numbers as CSV, print the sun path chart, or copy a link that opens the same settings.
Worked example
Input
A garden bed in London (51.507° N, 0.128° W), time zone Europe/London. A 2 m fence, and a house 9 m tall standing 12 m away to the south (180°), 12 m wide.
21 June and 21 December 2026
June: sunrise 04:43, solar noon 13:02 BST, sunset 21:21. At noon the sun is 61.9° high in the south, so the fence casts a 1.07 m shadow. December: solar noon 11:58 GMT and the sun only 15.1° high, so the same fence casts a 7.40 m shadow.
Hours of direct sun
The house blocks the sky from 153° to 207°, up to 36.9° high. On 21 June the sun clears it all day: 16 h 38 min of direct sun. On 21 December it hides behind the house from 10:04 to 13:52, leaving 4 h 1 min.
Averaged by month, the bed gets 16.6 hours a day in June and 4.1 hours in December. That makes it full sun from February to October and part sun from November to January. The Try an example button at the top loads exactly this garden.
How it works
Where the sun is
Two angles fix the sun in your sky. The declination is how far north or south of the equator the sun stands today. Because the Earth's axis is tilted, it reaches about 23.4° north in late June and 23.4° south in late December. The hour angle is how far the Earth has turned since the sun was highest: 15° for every hour.
sin(height) = sin(latitude) × sin(declination) + cos(latitude) × cos(declination) × cos(hour angle) direction = atan2(−sin(hour angle) × cos(declination), sin(declination) × cos(latitude) − cos(declination) × sin(latitude) × cos(hour angle))
Direction is measured clockwise from north: 90° is east, 180° south, 270° west. The declination, the hour angle and the equation of time come from the solar position equations published by NOAA. These follow Jean Meeus's Astronomical Algorithms.
Solar time and clock time
Your clock follows a time zone, not your longitude. The hour angle comes from true solar time:
true solar time (minutes) = UTC time + equation of time + 4 × longitude hour angle = true solar time ÷ 4 − 180°
The equation of time is the gap between sundial time and clock time caused by the Earth's tilt and elliptical orbit. It swings between about −14 and +16 minutes during the year. In London solar noon lands at 13:02 in June. Daylight saving adds an hour, the equation of time adds 1.8 minutes and London's longitude half a minute. Time zone rules, including daylight saving, come from the IANA time zone database built into your browser. The offset used is shown under the time.
Refraction and sunrise
The air bends sunlight, so the sun looks a little higher than it really is. The lift is about half a degree at the horizon and almost nothing overhead. Heights in the tool include NOAA's refraction correction. Sunrise and sunset follow NOAA's rule: the sun's upper edge touches the horizon when its center is 0.833° below it. That is 0.567° of refraction plus the sun's radius of 0.267°. Civil dawn and dusk are when the center is 6° below.
Shadow length
shadow length = object height ÷ tan(sun height) shadow direction = sun direction + 180°
A 2 m fence under the 15.115° December sun in London casts 2 ÷ tan(15.115°) = 7.40 m of shadow. Under the 61.94° June sun it casts 1.07 m. Winter shadows are long because the winter sun stays low: in London the noon sun climbs 46.8° higher in June than in December. Low sun makes long shadows fast. Below 2° the shadow is more than 28 times the object's height, and the slope of the ground matters more than the formula.
Obstacles and hours of direct sun
Each obstacle becomes a blocked part of the sky. An object is treated as a flat face square to your line of sight. Straight ahead its top is atan((height − your spot's height) ÷ distance) above the horizon, and it is lower toward its ends. A skyline blocks a range of directions up to one angle. The sun counts as blocked when its center is below the highest obstacle in its direction.
For the monthly chart the tool checks the sun every 2 minutes on every day of the year. It counts the minutes when the sun is up and above the obstacles, then averages them for each month. Garden labels follow UF/IFAS Extension: full sun means at least 6 hours of direct sun a day and part sun 3 to 6 hours. We label anything under 3 hours as shade.
Accuracy
NOAA states that its sunrise and sunset times are accurate to within a minute between 72° north and 72° south. Closer to the poles they are within 10 minutes. We compared the sun's position with NREL's reference Solar Position Algorithm at 200,000 random dates and places from 1900 to 2100. They typically agree to 0.004° and differ by at most about 0.02°, less than a twenty-fifth of the sun's width. Sunrise matches NREL's published example to the second. Real sunrise can still differ by a minute or two because the air bends light differently each day, and hills change your horizon. Dates from 1900 to 2100 work.
Show all the equations
With T the number of Julian centuries since 1 January 2000, 12:00 UT, angles in degrees (NOAA, after Meeus chapters 25 and 28):
mean longitude L0 = 280.46646 + 36000.76983 T + 0.0003032 T² mean anomaly M = 357.52911 + 35999.05029 T − 0.0001537 T² eccentricity e = 0.016708634 − 0.000042037 T − 0.0000001267 T² equation of center C = (1.914602 − 0.004817 T − 0.000014 T²) sin M + (0.019993 − 0.000101 T) sin 2M + 0.000289 sin 3M apparent longitude λ = L0 + C − 0.00569 − 0.00478 sin(125.04 − 1934.136 T) obliquity ε = 23° 26′ 21.448″ − 46.815″ T − 0.00059″ T² + 0.001813″ T³ + 0.00256 cos(125.04 − 1934.136 T) declination δ = asin(sin ε × sin λ) y = tan²(ε ÷ 2) equation of time (minutes) = 4 × degrees(y sin 2L0 − 2e sin M + 4ey sin M cos 2L0 − ½y² sin 4L0 − 1.25e² sin 2M)
Refraction in arcseconds, for a true height h: above 85°, none. From 5° to 85°: 58.1 ÷ tan h − 0.07 ÷ tan³ h + 0.000086 ÷ tan⁵ h. From −0.575° to 5°: 1735 − 518.2h + 103.4h² − 12.79h³ + 0.711h⁴. Below −0.575°: −20.772 ÷ tan h.
Sources
- NOAA Global Monitoring Laboratory, Solar Calculation Details: the equations, the 0.833° sunrise rule and the accuracy statement.
- Jean Meeus, Astronomical Algorithms, 2nd edition (1998), chapters 25 (solar coordinates) and 28 (equation of time).
- Ibrahim Reda and Afshin Andreas, Solar Position Algorithm for Solar Radiation Applications (checked 28 November 2026), NREL/TP-560-34302: the reference example used to test the numbers.
- IANA Time Zone Database: time zones and daylight saving (through your browser), and the coordinates of each zone's city (public domain). Other cities use center coordinates rounded to 0.01°, about 1 km.
- UF/IFAS Extension Nassau County, What is the real difference between partial shade and partial sun?: the hours behind the garden labels.
FAQ
How long will a shadow be at noon in winter?
It depends on how high the noon sun gets. In London on 21 December it is 15.1° high, so a 2 m fence casts a 7.40 m shadow, almost four times its height. Pick your city and a December date to see your numbers.
How many hours of sun does my garden get?
Add the trees, fences and buildings around the bed, then read the monthly chart. It shows the average hours of direct sun per day in each month. Each month is labeled full sun (6 hours or more), part sun (3 to 6 hours) or shade.
Where does the sun rise in summer and in winter?
It rises due east only around the equinoxes. In the Northern Hemisphere the summer sun rises north of east and sets north of west, and the winter sun rises south of east. In London sunrise moves from 49° (northeast) on 21 June to 128° (southeast) on 21 December.
What is solar noon, and why isn't it at 12:00?
Solar noon is the moment the sun is highest and due south (or due north south of the tropics). Clocks follow a time zone rather than your longitude, and daylight saving adds an hour. The equation of time also moves solar noon by up to about 16 minutes through the year. In London it falls at 13:02 in June and 11:58 in December.
How accurate is it?
In our tests the sun's position is typically within 0.004° of NREL's reference algorithm and at most about 0.02° off. That is less than a twenty-fifth of the sun's width. NOAA states its sunrise and sunset times are accurate to within a minute between 72° north and south. Real times can differ by a minute or two because of the weather and the shape of your horizon.
Does it include clouds or trees?
It doesn't include clouds: this is clear-sky geometry. It includes trees and buildings once you add them as obstacles. A tree counts as solid, so if it drops its leaves in winter, you may want to remove it when you read the winter months.
Can I use it to place solar panels?
Yes, for shade. Add the obstacles around the roof or yard, then see when they block the sun and how many hours of direct sun remain each month. It doesn't estimate energy output. For that, use NREL's PVWatts calculator.
Why do I need to choose a time zone?
The sun's position depends on the exact moment, and a clock time only pins that down with a time zone. Picking a city sets it for you. When you type coordinates, the tool takes the zone of the nearest listed place, so check it near borders.
Updated