How to calculate shadow length
The one-line formula for shadow length, worked examples, how to go the other way and find a height or sun angle, and how shadows change through the day and year.
On flat ground, the length of a shadow depends on just two things: how tall the object is and how high the sun is. That makes shadows easy to calculate and surprisingly useful, from planning a garden to measuring a tree.
The formula
With the object height h and the sun’s elevation α (the angle above the horizon):
A few values of 1 ÷ tan(α) are worth remembering:
| Sun elevation | Shadow is … times the height |
|---|---|
| 60° | 0.58 |
| 45° | 1.00 |
| 30° | 1.73 |
| 20° | 2.75 |
| 10° | 5.67 |
| 5° | 11.4 |
Near sunrise and sunset shadows become extremely long: at 1° elevation a 2 m person casts a shadow about 115 m long.
Worked examples
- A 10 m tree, sun at 25°: L = 10 ÷ tan 25° = 10 ÷ 0.466 = 21.4 m.
- A 1.8 m fence, sun at 18° (noon in December at about 48° N): L = 1.8 ÷ 0.325 = 5.5 m. The same fence in June, with the sun at about 65°: L = 1.8 ÷ 2.14 = 0.84 m.
- A 30 m building, sun at 40°: L = 30 ÷ 0.839 = 35.8 m.
Going the other way
Height from a shadow. If you know the sun’s elevation, h = L × tan(α). A tree with a 15 m shadow when the sun is 35° high is 15 × 0.700 = 10.5 m tall.
Without knowing the elevation, use a reference: at the same moment, measure the shadow of a stick of known height. Height of tree = stick height × (tree shadow ÷ stick shadow). This is how Thales of Miletus is said to have measured the Great Pyramid.
Sun elevation from a shadow. α = arctan(h ÷ L). A 1 m stick with a 1.5 m shadow means the sun is arctan(0.667) = 33.7° high.
Direction
A shadow always points directly away from the sun: its direction is the sun’s azimuth plus 180°. In the Northern Hemisphere at mid-latitudes, noon shadows point due north, morning shadows point roughly west (south-west in summer, north-west in winter) and evening shadows point roughly east (south-east in summer, north-east in winter).
Through the day and the year
Shadows are shortest at solar noon and grow towards sunrise and sunset. The tip of a shadow traces a curve over the day. On the equinoxes that curve is almost a straight east-west line; in summer and winter it curves in opposite directions. The shadow length calculator shows this curve for any place and date, together with the shadow length and direction at any moment.
Frequently asked questions
What is the formula for shadow length?
Shadow length = object height ÷ tan(sun elevation). For example, with the sun 30° high, a 2 m pole casts a shadow of 2 ÷ tan 30° = 3.46 m.
When is a shadow as long as the object?
When the sun is 45° above the horizon, because tan 45° = 1.
How do I find the height of a tree from its shadow?
Measure the tree's shadow and the shadow of an object of known height (for example a 1 m stick) at the same time. The heights are in the same ratio as the shadows. Or use the sun's elevation from a calculator and multiply the shadow length by tan(elevation).
Which way does a shadow point?
Directly away from the sun. If the sun's azimuth is 135° (south-east), the shadow points to 315° (north-west).