Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Shadow Length
17.32
same units as object height
Object height 10
Sun elevation angle 30°

What this calculator does

This tool relates three quantities of a sunlit object: its height, the length of the shadow it casts, and the sun's elevation angle (how high the sun sits above the horizon). Give it any two and it returns the third. It is purely geometric and works with any consistent units — metres, feet, inches — and applies anywhere in the world.

Comparison of short and long shadows at high versus low sun angles
A high sun makes short shadows; a low sun makes long shadows.

How to use it

Pick a mode. To find a shadow length, enter the object's height and the sun's elevation angle in degrees. To find the sun angle, enter the object's height and its measured shadow length. Press calculate and read the highlighted result.

The formula explained

The object, its shadow and the sun's ray form a right triangle. The object is the vertical side (height h), the shadow is the horizontal side (length L), and the sun's elevation angle θ sits at the tip of the shadow. Because \(\tan(\theta) = \text{opposite}/\text{adjacent} = h / L\), we can rearrange to get either unknown:

$$L = \frac{h}{\tan(\theta)}$$ and $$\theta = \arctan\!\left(\frac{h}{L}\right)$$ As the sun gets lower (\(\theta \to 0°\)), \(\tan(\theta)\) shrinks toward zero and shadows stretch toward infinity — which is why shadows are longest near sunrise and sunset.

Right triangle showing a vertical object, its shadow, the sun's rays, and the elevation angle theta
The object height, shadow length, and sun elevation angle form a right triangle.

Worked example

A 10 m flagpole stands when the sun is 30° above the horizon. The shadow length is $$L = \frac{10}{\tan(30°)} = \frac{10}{0.57735} \approx \mathbf{17.32 \text{ m}}$$ Reversing it: a 10 m pole with a 17.32 m shadow gives $$\theta = \arctan\!\left(\frac{10}{17.32}\right) = \arctan(0.5774) \approx \mathbf{30°}$$

FAQ

Do the units matter? No — as long as height and shadow use the same unit, the answer comes out in that same unit. The angle is always in degrees.

Why does the angle have to be between 0° and 90°? An elevation of 0° means the sun is on the horizon (infinite shadow) and 90° means it is straight overhead (no shadow). Values outside that range are not physical sun elevations.

Can I use this to find the sun's height in the sky? Yes. Measure any vertical object and its shadow, then use angle mode to get the current solar elevation.

Last updated: