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.
| Sun elevation (deg) | Flat | Falls 5 deg | Falls 10 deg | Falls 15 deg | Rises 5 deg | Rises 10 deg | Rises 15 deg |
|---|---|---|---|---|---|---|---|
| 10 | 5.671 | 11.299 | none | none | 3.805 | 2.879 | 2.330 |
| 15 | 3.732 | 5.563 | 11.083 | none | 2.824 | 2.286 | 1.932 |
| 20 | 2.747 | 3.631 | 5.411 | 10.782 | 2.224 | 1.879 | 1.638 |
| 30 | 1.732 | 2.049 | 2.532 | 3.346 | 1.510 | 1.347 | 1.225 |
| 40 | 1.192 | 1.336 | 1.532 | 1.813 | 1.083 | 1.000 | 0.935 |
| 45 | 1.000 | 1.100 | 1.233 | 1.414 | 0.923 | 0.863 | 0.816 |
| 60 | 0.577 | 0.610 | 0.653 | 0.707 | 0.552 | 0.532 | 0.518 |
Source: computed by the site build from the formulas below.
| Sun elevation (deg) | Flat ground | Falls: along slope | Falls: horizontal | Rises: along slope | Rises: horizontal |
|---|---|---|---|---|---|
| 10 | 5.671 | none | none | 2.879 | 2.836 |
| 15 | 3.732 | 11.083 | 10.914 | 2.286 | 2.251 |
| 20 | 2.747 | 5.411 | 5.329 | 1.879 | 1.851 |
| 30 | 1.732 | 2.532 | 2.494 | 1.347 | 1.327 |
| 40 | 1.192 | 1.532 | 1.509 | 1.000 | 0.985 |
| 45 | 1.000 | 1.233 | 1.214 | 0.863 | 0.850 |
| 60 | 0.577 | 0.653 | 0.643 | 0.532 | 0.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
- On flat ground the shadow is 1 / tan 30 = 1.7321 m.
- 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.
- 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.
- 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.
