Skip to content

Reference guide · Sun, shadow and Moon calculator

Shadow length on a slope: how the ground tilt stretches or shortens a shadow

By the Mirage Interactive team · Last checked

On flat ground a shadow is the object height divided by the tangent of the sun elevation. On a slope the same pole casts a longer shadow when the ground falls away from the sun, and a shorter one when it rises, because the ray from the top of the pole meets the ground further away or sooner.

This page covers the case where the slope runs straight toward or away from the sun, which has a closed form and is the one people want when they check how a hillside changes the shadow. When the slope is sideways to the sun, the geometry needs vectors, and the calculator handles it. For the flat-ground formula and sun elevation by latitude, see the sun angle guide linked below.

The short answer

For a vertical pole of height h and sun elevation e, the shadow along the ground is h x cos(e) / sin(e - s) when the shadow runs down a slope of angle s, and h x cos(e) / sin(e + s) when it runs up.

A 1 m pole with the sun 30 degrees high is 1.7321 m on flat ground. On a 10 degree slope the shadow measured along the slope is 2.5321 m when the ground falls away from the sun and 1.3473 m when it rises.

Tables

The first table gives the shadow length measured along the slope, per unit of pole height, for sun elevations from 10 to 60 degrees. "Falls" means the shadow runs down the slope, "rises" means it runs up. The second table splits out the 10 degree slope, and gives the horizontal distance of the shadow tip as well. Use your browser's print command to print this page: the tables print without the navigation.

Shadow length along the ground per unit of pole height, by sun elevation (rows, degrees) and slope
Sun elevation (deg)FlatFalls 5 degFalls 10 degFalls 15 degRises 5 degRises 10 degRises 15 deg
105.67111.299nonenone3.8052.8792.330
153.7325.56311.083none2.8242.2861.932
202.7473.6315.41110.7822.2241.8791.638
301.7322.0492.5323.3461.5101.3471.225
401.1921.3361.5321.8131.0831.0000.935
451.0001.1001.2331.4140.9230.8630.816
600.5770.6100.6530.7070.5520.5320.518

Source: computed by the site build from the formulas below.

Shadow per unit of pole height on a 10 degree slope: along the slope and as a horizontal distance
Sun elevation (deg)Flat groundFalls: along slopeFalls: horizontalRises: along slopeRises: horizontal
105.671nonenone2.8792.836
153.73211.08310.9142.2862.251
202.7475.4115.3291.8791.851
301.7322.5322.4941.3471.327
401.1921.5321.5091.0000.985
451.0001.2331.2140.8630.850
600.5770.6530.6430.5320.524

Source: computed by the site build from the formulas below.

Formulas

Flat ground
shadow = h / tan(e)
h is the height of the pole, e the sun elevation above the horizon.
Slope falling away from the sun
shadow along slope = h x cos(e) / sin(e - s)
The shadow runs down the slope. If the slope is as steep as the sun is high, e = s, the ray runs parallel to the ground and never meets it: the table shows "none".
Slope rising away from the sun
shadow along slope = h x cos(e) / sin(e + s) horizontal distance = along slope x cos(s)
Both come from the law of sines in the vertical plane through the pole and the sun. The horizontal distance is the distance on a map.

Worked example

A 1 m pole, sun 30 degrees high, on a 10 degree slope

  1. On flat ground the shadow is 1 / tan 30 = 1.7321 m.
  2. If the ground falls away from the sun, the shadow is cos 30 / sin 20 = 2.5321 m along the slope, which is 2.4936 m on a map.
  3. If the ground rises away from the sun, the shadow is cos 30 / sin 40 = 1.3473 m along the slope, which is 1.3268 m on a map.
  4. So a 10 degree slope turns a 1.73 m shadow into 2.53 m on one side and 1.35 m on the other.

Things to watch

  • The slope angle is the angle of the ground from the horizontal, measured along the line toward the sun. If the slope runs partly sideways to the sun, the geometry needs vectors, as the vector form in the Sun & Shadow calculator does; these tables do not cover it.
  • The sun elevation is the geometric one. Atmospheric refraction lifts the sun by about half a degree near the horizon, which matters at low sun.
  • The pole is vertical. A leaning object, a building with a roof or a tree is not a pole: use the position of the tip.

Related guide: Sun angle by latitude and shadow length table

More from this family: Solar panel row spacing calculator: pitch between rows for no shading · Sun position and shadow length: declination, noon elevation and shadow

Skip the arithmetic

Sun Position & Shadow Length

Sun Position & Shadow Length gives the azimuth and elevation of the sun and the shadow length and direction through the day, on flat ground or a slope. One-time purchase · No subscription · Price shown in your store. Works offline, no ads, no account.

Questions

How long is a shadow on sloping ground?

Multiply the pole height by cos(e) and divide by sin(e - s) when the shadow runs down the slope, or sin(e + s) when it runs up. e is the sun elevation and s the slope.

Why is a shadow longer downhill?

The ground drops away under the ray from the top of the pole, so the ray has further to go before it meets the ground.

When does a shadow have no end on a slope?

When the slope falls away from the sun at an angle equal to or greater than the sun elevation: the ray runs along or above the ground and never meets it.