Shadow Length & Sun Angle Calculator

Shadow Length & Sun Angle Calculator

Growing AI Skill PRO

Enter Calculation

Formula

L=Heighttan⁡(Elevation)L = \frac{\text{Height}}{\tan\!\left(\text{Elevation}\right)}
Usage stats

Advertisement

Results

Shadow Length
3.46
same units as object height
Object height 2
Sun elevation angle 30°

Report an error on this page

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.

Advertisement
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°}$$

Shadow Length Multipliers by Sun Elevation Angle

The sun's elevation angle \(\theta\) is measured up from the horizon. An object of height \(h\) casts a shadow of length \(L = h / \tan(\theta)\). The ratio \(L/h = 1/\tan(\theta)\) depends only on the angle, so the table below works for any object and any unit.

Sun elevation θ tan(θ) Shadow-to-height ratio L/h = 1/tan(θ)
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
85° 11.430 0.087

Shadow = height × ratio. For example, at 15° a 6 m pole casts a shadow of about 6 × 3.73 ≈ 22.4 m. Conversely, if you measure the height and the shadow, the elevation is \(\theta = \arctan(h / L)\).

Note: this uses elevation above the horizon. If a source gives the solar zenith angle \(z\) (measured from straight up), use \(\theta = 90^\circ - z\). The formula assumes flat, level ground.

Advertisement

Shadow Length for a Given Height at Different Times of Day

The sun is low in the morning and evening and highest around solar noon. The table shows the shadow of a fixed 2 m object at several elevations, computed as \(L = 2 / \tan(\theta)\).

Sun elevation θ Calculation Shadow length (2 m object)
10° 2 / 0.1763 11.34 m
20° 2 / 0.3640 5.49 m
30° 2 / 0.5774 3.46 m
45° 2 / 1.0000 2.00 m
60° 2 / 1.7321 1.15 m
80° 2 / 5.6713 0.35 m

At a 45° elevation the shadow length equals the object's height, because \(\tan 45^\circ = 1\). Below 45° the shadow is longer than the object, and above 45° it is shorter. Shadows grow very quickly at low angles: going from 10° to 5° would roughly double the shadow of the same object.

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:

Most popular in Math and Statistics

View all Math and Statistics calculators