What Is the Shadow Length Calculator?
This calculator finds the length of the shadow cast by an upright object when the sun is at a given angle above the horizon. Knowing shadow length is useful for solar panel spacing, architecture and overshadowing studies, photography planning, gardening, and classic "height of a flagpole" geometry problems. The tool works with any consistent unit (feet, meters, etc.) — the shadow is returned in the same unit you entered for the height.
How to Use It
Enter the object's height and the sun's elevation angle (its altitude above the horizon, from 0° at the horizon to 90° straight overhead). Press calculate to see the shadow length, plus the shadow-to-height ratio so you can quickly scale to other objects. A low sun angle produces a long shadow; a high sun produces a short one.
The Formula Explained
An upright object of height h and its shadow form a right triangle. The sun's elevation angle θ sits at the tip of the shadow, with the object as the opposite side and the shadow as the adjacent side. Since \(\tan(\theta) = \text{opposite} / \text{adjacent} = h / L\), solving for the shadow gives:
$$L = \frac{h}{\tan(\theta)}$$
As \(\theta\) approaches 0° the shadow stretches toward infinity; at 90° (sun directly overhead) the shadow shrinks to zero.
Worked Example
A 10-meter pole with the sun 30° above the horizon: \(\tan(30°) \approx 0.5774\), so $$L = \frac{10}{0.5774} \approx 17.32 \text{ m}.$$ The shadow is about 1.73 times the pole's height — exactly \(\cot(30°) = \sqrt{3}\).
Shadow-to-Height Ratio by Sun Elevation Angle
The shadow length on flat, level ground is \(L = \frac{h}{\tan\theta}\), where \(h\) is the object height and \(\theta\) is the sun's elevation angle above the horizon. The ratio \(L/h = 1/\tan\theta\) depends only on the angle, so you can reuse it for any object. Multiply the ratio by the object height to get the shadow length (in the same unit as the height).
| Sun elevation θ | tan(θ) | Shadow-to-height ratio L/h |
|---|---|---|
| 5° | 0.0875 | ≈ 11.43 |
| 10° | 0.1763 | ≈ 5.67 |
| 15° | 0.2679 | ≈ 3.73 |
| 20° | 0.3640 | ≈ 2.75 |
| 30° | 0.5774 | ≈ 1.73 |
| 45° | 1.0000 | 1.00 |
| 60° | 1.7321 | ≈ 0.58 |
| 75° | 3.7321 | ≈ 0.27 |
| 90° | undefined (infinitely large) | 0 (no shadow) |
Notice how quickly the shadow grows at low sun angles: below about 10° the shadow is more than five times the object's height. At 45° the shadow equals the height exactly.
How to Calculate Shadow Length by Hand
- Measure the object's height \(h\) (for example a pole, tree or person) from the ground to its top.
- Find the sun's elevation angle \(\theta\), measured upward from the horizon, using a solar position table, an app, or a sun-angle measuring tool.
- Set your calculator to degree mode (not radians), since the elevation angle is given in degrees.
- Compute tan(θ) for your angle.
- Divide the height by tan(θ): \(L = \frac{h}{\tan\theta}\).
- Keep units consistent. The shadow length comes out in the same unit you used for the height (meters in, meters out; feet in, feet out).
Worked example: A person 1.8 m tall stands in sunlight with the sun 35° above the horizon. Then \(\tan 35^\circ \approx 0.7002\), so
$$L = \frac{1.8}{\tan 35^\circ} = \frac{1.8}{0.7002} \approx$$ 2.57 m.
Reversing the calculation: if you measure both the object's height \(h\) and its shadow length \(L\), the sun's elevation angle is \(\theta = \arctan\left(\frac{h}{L}\right)\). The zenith angle (measured from straight overhead) is \(z = 90^\circ - \theta\), so the shadow can also be written \(L = h\cdot\tan z\).
These formulas assume flat, level ground and a vertical object. On a slope the shadow will be shorter or longer than predicted.
FAQ
What is the solar elevation angle? It is the angle of the sun above the horizon. It changes through the day and across seasons; tools like sun-position calculators give it for any time and place.
Why does my shadow get infinitely long near sunrise? As the elevation angle nears 0°, \(\tan(\theta)\) nears 0, so dividing by it makes the shadow huge — matching the very long shadows seen at dawn and dusk.
What units does the result use? The same units you enter for height. Enter meters, get meters; enter feet, get feet.