# Help with math - slope/elevation

**URL:** <https://boards.straightdope.com/t/help-with-math-slope-elevation/788859>\
**Category:** Factual Questions\
**Created:** [June 13, 2017, 1:18pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859 "2017-06-13T13:18:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Jackson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lucas_jackson/32/303_2.png) [@Lucas\_Jackson](https://boards.straightdope.com/u/Lucas_Jackson)\
**Post date:** [June 13, 2017, 1:18pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/1 "2017-06-13T13:18:27Z")

</div>

I’m helping a friend put together a series of informal hiking guides for an event. We are trying to determine the total elevation gain/loss for each trail. We know the trail length (most are fairly straight) and the running grade is posted at the trailheads. What is the formula for determining the total feet in elevation gained.

For example if a trail is 3/4 miles long and the grade is 9%, what would be the total elevation in feet gained?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 13, 2017, 1:23pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/2 "2017-06-13T13:23:40Z")

</div>

It’s 9% of 3/4 mile. In feet, that works out to [about 360 feet](https://www.google.com/#q=0.09*(3/4)+miles+in+feet).

---

<div class="post-metadata">

**Author:** ![Lucas\_Jackson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lucas_jackson/32/303_2.png) [@Lucas\_Jackson](https://boards.straightdope.com/u/Lucas_Jackson)\
**Post date:** [June 13, 2017, 1:35pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/3 "2017-06-13T13:35:33Z")

</div>

I’m looking for the elevation change. 9% is the slope/grade. So for example if I started at 250 feet above sea level and walked 3/4 of a mile at a 9% incline, what would be my elevation at my destination?

---

<div class="post-metadata">

**Author:** ![Inner\_Stickler](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/inner_stickler/32/318_2.png) [@Inner\_Stickler](https://boards.straightdope.com/u/Inner_Stickler)\
**Post date:** [June 13, 2017, 1:42pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/4 "2017-06-13T13:42:42Z")

</div>

250+360 feet.

---

<div class="post-metadata">

**Author:** ![Lucas\_Jackson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lucas_jackson/32/303_2.png) [@Lucas\_Jackson](https://boards.straightdope.com/u/Lucas_Jackson)\
**Post date:** [June 13, 2017, 1:42pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/5 "2017-06-13T13:42:44Z")

</div>

Never mind I think I see where I was confused.

Thanks to you both!

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 13, 2017, 2:03pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/6 "2017-06-13T14:03:39Z")

</div>

Out of curiosity, where was the confusion? I’m glad that you figured it out, but if I meet someone else with the same confusion in the future (likely, for a math teacher), I’d like to be able to clear it up.

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [June 13, 2017, 2:41pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/7 "2017-06-13T14:41:02Z")

</div>

Chronos’ answer assumes the gradient is the sine of the road angle. If [Wikipedia](https://en.wikipedia.org/wiki/Grade_(slope)) is to be believed, it’s actually the tangent of the road angle. For small angles like those typically found in roads, the difference is small. I don’t know which method is typically used in calculating road grades, and I suppose it really doesn’t matter since grades are almost always rounded to a whole degree and the road distances aren’t very accurate either. But if the 9% grade were exact and is actually a tangent, the elevation gain would be 355.0 ft = (3/4 mile) \* sin(atan(.09)) rather than 356.4 ft = (3/4 mile) \* .09.

---

<div class="post-metadata">

**Author:** ![am77494](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@am77494](https://boards.straightdope.com/u/am77494)\
**Post date:** [June 13, 2017, 2:52pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/8 "2017-06-13T14:52:41Z")

</div>

> [@Chronos](#):
>
> Out of curiosity, where was the confusion? I’m glad that you figured it out, but if I meet someone else with the same confusion in the future (likely, for a math teacher), I’d like to be able to clear it up.

I think the confusion was between 9% and 9°. I have had that confusion myself sometimes.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 13, 2017, 3:14pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/9 "2017-06-13T15:14:10Z")

</div>

Actually, I was assuming that it was the tangent, but I was also assuming that the posted length of the trail was the horizontal component of the distance (i.e., what you would see on a flat map).

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [June 13, 2017, 3:20pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/10 "2017-06-13T15:20:30Z")

</div>

I’ve actually wondered about this in the past. It seems easier to measure distance along the road itself (the hypotenuse), with an odometer or similar device, and I’ve assumed that that’s what road signs measure. Given that, and assuming the elevation gain is known, it would be easier for road grades to be the sine of the angle, although it’s fairly trivial to convert from the sine to the tangent. I wonder how road engineers actually calculate the grades that are posted on road signs.

---

<div class="post-metadata">

**Author:** ![Lucas\_Jackson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lucas_jackson/32/303_2.png) [@Lucas\_Jackson](https://boards.straightdope.com/u/Lucas_Jackson)\
**Post date:** [June 13, 2017, 3:42pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/11 "2017-06-13T15:42:08Z")

</div>

> [@Chronos](#):
>
> Out of curiosity, where was the confusion? I’m glad that you figured it out, but if I meet someone else with the same confusion in the future (likely, for a math teacher), I’d like to be able to clear it up.

The first link on the page of your link was miles-to-feet conversion. The 9\* part of your equation initially led me think you were only calculating a percentage of the total distance, with no relationship to the rise. Having actually been on the trail my guess would have been closer to 50 feet so that also added to my confusion.

---

<div class="post-metadata">

**Author:** ![DSYoungEsq](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@DSYoungEsq](https://boards.straightdope.com/u/DSYoungEsq)\
**Post date:** [June 13, 2017, 5:53pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/12 "2017-06-13T17:53:11Z")

</div>

> [@markn\_1](#):
>
> Chronos’ answer assumes the gradient is the sine of the road angle. If [Wikipedia](https://en.wikipedia.org/wiki/Grade_(slope)) is to be believed, it’s actually the tangent of the road angle. For small angles like those typically found in roads, the difference is small. I don’t know which method is typically used in calculating road grades, and I suppose it really doesn’t matter since grades are almost always rounded to a whole degree and the road distances aren’t very accurate either. But if the 9% grade were exact and is actually a tangent, the elevation gain would be 355.0 ft = (3/4 mile) \* sin(atan(.09)) rather than 356.4 ft = (3/4 mile) \* .09.

Why would you think this? 9% is 9%, not 9º. The question that MIGHT be left hanging is, is the 9% measured by the rise over the horizontal run, or is it the rise as a percentage of the actual road length along the hypotenuse? Generally speaking, it’s calculated as rise over horizontal run, a simple calculation as **Chronos** showed.

You don’t need to use trig in that case at all.

---

<div class="post-metadata">

**Author:** ![DSYoungEsq](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@DSYoungEsq](https://boards.straightdope.com/u/DSYoungEsq)\
**Post date:** [June 13, 2017, 5:54pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/13 "2017-06-13T17:54:27Z")

</div>

> [@markn\_1](#):
>
> I’ve actually wondered about this in the past. It seems easier to measure distance along the road itself (the hypotenuse), with an odometer or similar device, and I’ve assumed that that’s what road signs measure. Given that, and assuming the elevation gain is known, it would be easier for road grades to be the sine of the angle, although it’s fairly trivial to convert from the sine to the tangent. I wonder how road engineers actually calculate the grades that are posted on road signs.

calculating a horizontal distance moved is not particularly hard; it’s a simple thing to do with latitude and longitude known. But, again, for a _percentage_, that’s not an issue. If you want the DEGREE of slope, then you get all trigonometric.

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [June 13, 2017, 9:20pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/14 "2017-06-13T21:20:57Z")

</div>

> [@DSYoungEsq](#):
>
> Why would you think this? 9% is 9%, not 9º. The question that MIGHT be left hanging is, is the 9% measured by the rise over the horizontal run, or is it the rise as a percentage of the actual road length along the hypotenuse? Generally speaking, it’s calculated as rise over horizontal run, a simple calculation as **Chronos** showed.
> 
> You don’t need to use trig in that case at all.

For Chronos’s answer to be correct, you have to assume, as he has confirmed that he did, that the “3/4 mile” distance posted on the sign refers to the horizontal distance between the two points. This is not at all what I expect road signs to measure; I assume that if the sign says “3/4 mile”, my odometer will register 3/4 mile when I’ve travelled between those two points. You really assume that it won’t?

If you assume as I did that the sign mileage is the road distance (hypotenuse) and the grade is (as you said) the rise divided by the horizontal distance, then the trig function I mentioned is the easiest way to calculate the elevation gain. That is,  
elevation = sin(atan(grade)) \* distance  
The domain of the arctangent function is the gradient, a ratio, not an angle.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 13, 2017, 10:27pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/15 "2017-06-13T22:27:43Z")

</div>

Then again, trails are not roads. A trail is much less likely to be measured using an odometer or similar device.

There’s a park near me that has some extremely steep trails (as in, they go up hundreds of steps). Next time I’m there, I’ll have to check to see if I can see any trail-distance markers near the top and bottom.

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [June 13, 2017, 10:54pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/16 "2017-06-13T22:54:41Z")

</div>

Perhaps. I know if I saw a trail sign that said “40% grade. 5 miles to summit,” I would expect to walk 5 miles, not 5.4 miles. And if I met the guy who posted the sign when I reached the top, I’d have a few words with him.

---

<div class="post-metadata">

**Author:** ![DSYoungEsq](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@DSYoungEsq](https://boards.straightdope.com/u/DSYoungEsq)\
**Post date:** [June 14, 2017, 4:34am UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/17 "2017-06-14T04:34:29Z")

</div>

> [@markn\_1](#):
>
> For Chronos’s answer to be correct, you have to assume, as he has confirmed that he did, that the “3/4 mile” distance posted on the sign refers to the horizontal distance between the two points. This is not at all what I expect road signs to measure; I assume that if the sign says “3/4 mile”, my odometer will register 3/4 mile when I’ve travelled between those two points. You really assume that it won’t?
> 
> If you assume as I did that the sign mileage is the road distance (hypotenuse) and the grade is (as you said) the rise divided by the horizontal distance, then the trig function I mentioned is the easiest way to calculate the elevation gain. That is,  
> elevation = sin(atan(grade)) \* distance  
> The domain of the arctangent function is the gradient, a ratio, not an angle.

I think you missed my point. If I go 3/4 of a mile along the hypotenuse, and the grade is 9%, then I would assume I’ve gone 9% of 3/4 of a mile UP. That is to say, I think you’re overly complicating the matter by assuming that the percentage grade is based upon rise over run, but that the distance of the grade is based upon the hypotenuse. Only in that case would I have to resort to fancy calculations. And given the nearly identical results, I find it doubtful that anyone calculates the grade percent in that fashion. I certainly doubt that trail guidebooks bother with that sort of calculation.

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [June 14, 2017, 2:51pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/18 "2017-06-14T14:51:43Z")

</div>

> [@DSYoungEsq](#):
>
> I think you missed my point. If I go 3/4 of a mile along the hypotenuse, and the grade is 9%, then I would assume I’ve gone 9% of 3/4 of a mile UP.

I understood your point, I just don’t think you’re correct.

You and I agree that the grade is the rise divided by the horizontal run (the tangent of the angle of the road above horizontal). I claim that road distances are (probably) given as a distance along the surface of the road. If those two facts are true, then your calculation is incorrect. I agree that the error is small for reasonable road grades, and said so in my original post. The difference in the OP’s example is less than two feet, as I said.

Neither road distance signs nor road grade signs are posted there to make it easy to calculate elevation gain. So the fact that the correct calculation is nontrivial doesn’t argue against it. Road distance signs are there to tell you how far you need to travel along the road. Road grade signs are there to tell you the steepness of the slope you’ll be climbing. Putting these together to calculate a strictly accurate elevation gain does unfortunately involve trigonometry.

I could be wrong in one of two ways. Road grade could actually be the road distance divided by the elevation gain (the sine of the road angle). Or road distance signs could be measuring the horizontal distance between the two point, not the road distance. I wouldn’t be too surprised if either of these is true, given that the required change in the signs would be so small (in most cases, nonexistent since it would be hidden by rounding). So road engineers probably use whatever method is most convenient, perhaps using an odometer to measure short distances and a map to measure long ones. My point is mostly academic.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 14, 2017, 3:00pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/19 "2017-06-14T15:00:08Z")

</div>

The measure of steepness could be given equally reasonably as either the sine or the tangent of the angle. If the distinction is big enough to matter, why wouldn’t the cartographers use the one that makes elevation calculations easier? And then you just have the question of which is the more convenient distance measure: The hypoteneuse distance as measured by odometers, or the horizontal component as measured on maps.

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [June 14, 2017, 3:20pm UTC](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859/20 "2017-06-14T15:20:44Z")

</div>

> [@Chronos](#):
>
> If the distinction is big enough to matter, why wouldn’t the cartographers use the one that makes elevation calculations easier?

I assume the purpose of grade signs is to notify trucks and other large vehicles what the slope is, so that they know whether it’s safe to traverse the road (or for trails, how steep the hike is). Whether it makes elevation calculations easy is very much a secondary consideration, if it’s a consideration at all. Every reference I’ve found (such as the wiki article I quoted earlier) says that road grade is specified as rise over run, as is standard in math as well.

I found [this quote](https://books.google.com/books?id=K34AAAAAMAAJ&pg=PA384&lpg=PA384&source=bl&ots=8utzSCoCcB&sig=DrX2m_7GfdV9hQxWSHM8v_AWz38&hl=en&sa=X&ved=0ahUKEwjDveyiz73UAhVW5WMKHaJ7A88Q6AEIaTAM#v=onepage&f=false) in _Handbook of Mathematics for Engineers and Engineering Students_, which mentions the issue without really clearing up what’s actually used in practice:

> [@](#):
>
> The _grade_ of a road is the height which the road rises from the horizontal in a given distance; it is generally expressed in per cent. Thus a grade of 3% = 3/100 = tan a = 0.03 is expressed by the tangent of the angle which the surface of the road makes with the horizontal. If the distance is taken on the surface of the road, this ratio is then the sine of the slope angle a, but in any case the slope is generally so small that there is little difference between the tangent and the sine.

[Next page](https://boards.straightdope.com/t/help-with-math-slope-elevation/788859.md?page=2)
