How to use this tool
- Set place, date and time with the controls at the top, or press play to animate the day.
- Enter a height (for example a 2 m pole, a 10 m tree or a 30 m building) in metres or feet.
- Read the result: shadow length, the direction the shadow points, the sun’s elevation and the shadow-to-height ratio.
- Go backwards: switch to “Height from shadow” and enter a measured shadow length to get the height of the object.
The formula
The sun’s rays, the object and its shadow form a right-angled triangle, so:
- Shadow length L = h ÷ tan(α)
- Height h = L × tan(α)
- Sun elevation α = arctan(h ÷ L)
where h is the height and α the sun’s elevation. At 45° a shadow is as long as the object; at 30° it is 1.73 times as long; at 10° it is 5.7 times as long. The guide how to calculate shadow length has more examples.
The charts
- Side view shows the object, the sun’s rays and the shadow for the selected moment.
- Path of the shadow tip shows, from above, where the tip of the shadow moves during the day. The dashed curves are for the solstices. On the equinoxes the path is almost a straight east-west line.
- Shadow length through the day shows the shadow as a multiple of the object’s height, shortest at solar noon.
Worked example
In Ljubljana on the June solstice at 16:00, the sun is about 48° high in the west-south-west (azimuth about 253°), so a 10 m tree casts a shadow of about 9 m towards the east-north-east. On the December solstice at solar noon the sun is only about 20.5° high, and the same tree casts a shadow of about 27 m pointing due north.
Uses
Planning where to put a garden bed, estimating how far a new building’s shadow will reach, measuring the height of a tree, or making a simple sundial: all need the same simple geometry.
Last updated September 23, 2026