Hill calculation formula
#26
Software for Cyclists

Joined: Dec 2003
Posts: 4,618
Likes: 0
From: Redding, California
Bikes: Trek 5200, Specialized MTB
Originally Posted by CastIron
MAC friendly?
I've looked into porting the software to the Mac, but it would be a huge project (I estimate around 1000 hours). Given the Mac's small market share, and my other time committments (a full time job, a new relationship, and my bikes), I just can't justify the effort at this time.
However, I've heard rumors that with Apple's recent decision to use Intel chips, it may someday be possible to run Windows programs on Mac's.
#27
Thread Starter
Da Big Kahuna

Joined: May 2003
Posts: 814
Likes: 0
From: Oahu, Hawaii
Originally Posted by JavaMan
The horizontal length you calculated using Pythagorus is not necessary to find explicitly. The inverse sin or ASIN of (elevation gain/distance up the hill) gives you the angle of the hill. Since you now know the angle, you just take the TAN of that angle to get the grade. Then multiply by 100 for percent. That's the formula. RISE is in feet, DISTANCE is in miles.
%GRADE = TAN(ASIN(RISE/(5280*DISTANCE)))*100
%GRADE = TAN(ASIN(RISE/(5280*DISTANCE)))*100
Right now, instead of the one quoted above from you, I'm using this one:
=(ATAN((Rise/Distance)*180/PI()
All info is in feet. So, is your's better?
Also, using the Delorme software to give the average grade (apparently only uses whole numbers), it shows the steepest short block of my three steepest I've ridden is 15%. Near as I can tell, the software must be using the formula of the rise/distance (gradient). According to the formula for degrees listed above, it would be about 8.6 degrees.
Hope I haven't gotten confused over all these things!
#28
Software for Cyclists

Joined: Dec 2003
Posts: 4,618
Likes: 0
From: Redding, California
Bikes: Trek 5200, Specialized MTB
Originally Posted by TheRCF
Well, I'm confused, but all I need is someone to let me know which, of all these formulas posted, give the most accurate result.
Right now, instead of the one quoted above from you, I'm using this one:
=(ATAN((Rise/Distance)*180/PI()
All info is in feet. So, is your's better?
Also, using the Delorme software to give the average grade (apparently only uses whole numbers), it shows the steepest short block of my three steepest I've ridden is 15%. Near as I can tell, the software must be using the formula of the rise/distance (gradient). According to the formula for degrees listed above, it would be about 8.6 degrees.
Hope I haven't gotten confused over all these things!
Right now, instead of the one quoted above from you, I'm using this one:
=(ATAN((Rise/Distance)*180/PI()
All info is in feet. So, is your's better?
Also, using the Delorme software to give the average grade (apparently only uses whole numbers), it shows the steepest short block of my three steepest I've ridden is 15%. Near as I can tell, the software must be using the formula of the rise/distance (gradient). According to the formula for degrees listed above, it would be about 8.6 degrees.
Hope I haven't gotten confused over all these things!
In my experience, their estimates for total climbing are typically 10-25% too high.
As for formula - the simplest one (Elevation Gained / Distance Ridden) x 100 is about as accurate as the more complex formula. For most road grades, the difference is entirely negligible (and well within the margins of error for the data).
#29
Senior Member
Joined: Sep 2004
Posts: 1,068
Likes: 0
From: Southern California
Bikes: 2013 KHS Flite 747
Originally Posted by TheRCF
Well, I'm confused, but all I need is someone to let me know which, of all these formulas posted, give the most accurate result.
Right now, instead of the one quoted above from you, I'm using this one:
=(ATAN((Rise/Distance)*180/PI()
All info is in feet. So, is your's better?...
Right now, instead of the one quoted above from you, I'm using this one:
=(ATAN((Rise/Distance)*180/PI()
All info is in feet. So, is your's better?...
Which is better? That's up to you!
#30
Thread Starter
Da Big Kahuna

Joined: May 2003
Posts: 814
Likes: 0
From: Oahu, Hawaii
That's good to know - but if I understand you correctly, the error would be in the distance traveled? I can, of course, measure that on my rides. The critical issue for me would be the starting elevation and the final elevation. I can do the other calculations myself.
I understand your point about the "simplest" formulas being, essentially, good enough, especially considering inherent error on any climb. But I figure that since the computer is doing all the work, might as well be as accurate as possible. The inherent errors could go either way so it is still a benefit to use the best formulas.
Thanks.
Bob
I understand your point about the "simplest" formulas being, essentially, good enough, especially considering inherent error on any climb. But I figure that since the computer is doing all the work, might as well be as accurate as possible. The inherent errors could go either way so it is still a benefit to use the best formulas.
Thanks.
Bob
#31
Software for Cyclists

Joined: Dec 2003
Posts: 4,618
Likes: 0
From: Redding, California
Bikes: Trek 5200, Specialized MTB
Originally Posted by JavaMan
My formula gives the exact result. The others are approximations.
Which is better? That's up to you!
Which is better? That's up to you!
For instance, a climb of 5 miles, with a 7% grade will have 1,843 feet of climbing.
Your formula will yield 7.00% grade.
But, the simpler formula (1843 / (5 x 5280)) x 100 yields 6.98% grade...virtually the same, and much easier to calculate if one is just using a calculator.
However, I understand your committment to accuracy, which is why I use the "Atan" formula in the Climbing Calculator in CycliStats.
#32
Software for Cyclists

Joined: Dec 2003
Posts: 4,618
Likes: 0
From: Redding, California
Bikes: Trek 5200, Specialized MTB
Originally Posted by JavaMan
My formula gives the exact result. The others are approximations.
Which is better? That's up to you!
Which is better? That's up to you!
For instance, assume a climb with 1843 feet of elevation gain in 5.0 miles of riding.
The more accurate "Atan" formula shows that the average grade is 7.00%.
But, the "approximation" (Elevation Gained / Distance Ridden) x 100 shows an average grade of 6.98%. Given the inherent inaccuracy in the "Elevation Gained" variable, the approximation is every bit as accurate as the "Atan" formula.
That said, I understand your obsession with numerical accuracy, and that's the formula I use in my CycliStats Climbing Calculator.
#33
Software for Cyclists

Joined: Dec 2003
Posts: 4,618
Likes: 0
From: Redding, California
Bikes: Trek 5200, Specialized MTB
Originally Posted by SSP
The "approximations" are nearly identical for most climbs, and much easier to calculate with a calculator.
For instance, assume a climb with 1843 feet of elevation gain in 5.0 miles of riding.
The more accurate "Atan" formula shows that the average grade is 7.00%.
But, the "approximation" (Elevation Gained / Distance Ridden) x 100 shows an average grade of 6.98%. Given the inherent inaccuracy in the "Elevation Gained" variable, the approximation is every bit as accurate as the "Atan" formula.
That said, I understand your obsession with numerical accuracy, and that's the formula I use in my CycliStats Climbing Calculator.
For instance, assume a climb with 1843 feet of elevation gain in 5.0 miles of riding.
The more accurate "Atan" formula shows that the average grade is 7.00%.
But, the "approximation" (Elevation Gained / Distance Ridden) x 100 shows an average grade of 6.98%. Given the inherent inaccuracy in the "Elevation Gained" variable, the approximation is every bit as accurate as the "Atan" formula.
That said, I understand your obsession with numerical accuracy, and that's the formula I use in my CycliStats Climbing Calculator.
#34
Super Modest



Joined: Jun 2002
Posts: 25,385
Likes: 6,665
From: Central Illinois
Bikes: Trek Domane+x2, Trek Emonda
As a retired highway engineer, much of what I've read here is nit-picking.
First off, highway grades are frequently a combination of grades or in the case of old roads, erratic grades at best. Using topo maps will yield an average grade but won't account for those short stretches of leg searing pitch or transitional vertical curves. Measuring points with a level or other gradient device is only accurate at that point and may change a 100' up the hill.
In other words, significant digits past a whole number, or a tenth at the most is all that one can accurately expect without surveying equipment. Having said that, either formula given in previous posts will yield a percent grade more than accurate enough for real-life purposes.
I had a cyclist in my area ask me the grade of a local road and I went out with a 10' level and an engineering rule to take some quick and dirty measurements. I measured the 1/2 mile grade in three places and got grades of 7.8, 9.2, and 10.5. All that in less than 1/2 of a mile on a relatively new road. So is it a 7.8 or a 10.5% grade? Is it an average of the three? Regardless of what one calls its grade, it's still going to ride the same.
First off, highway grades are frequently a combination of grades or in the case of old roads, erratic grades at best. Using topo maps will yield an average grade but won't account for those short stretches of leg searing pitch or transitional vertical curves. Measuring points with a level or other gradient device is only accurate at that point and may change a 100' up the hill.
In other words, significant digits past a whole number, or a tenth at the most is all that one can accurately expect without surveying equipment. Having said that, either formula given in previous posts will yield a percent grade more than accurate enough for real-life purposes.
I had a cyclist in my area ask me the grade of a local road and I went out with a 10' level and an engineering rule to take some quick and dirty measurements. I measured the 1/2 mile grade in three places and got grades of 7.8, 9.2, and 10.5. All that in less than 1/2 of a mile on a relatively new road. So is it a 7.8 or a 10.5% grade? Is it an average of the three? Regardless of what one calls its grade, it's still going to ride the same.
__________________
“Train hard until your legs are tanned, then keep going until the shape arrives.” -Jolanda Neff
#35
Thread Starter
Da Big Kahuna

Joined: May 2003
Posts: 814
Likes: 0
From: Oahu, Hawaii
Yeah, those grades do keep changing - I particularly hate the switchbacks on the long 5 mile climb I sometimes do when I'm on the inside of the curve. They can really be tough compared to the rest.
Ultimately, the main thing I want to be able to do is make comparisons to others, even if less than perfect. I mean, think how many times people talk about how they had this "big" hill or "long" hill or "steep" hill, etc - even comments about how strong the wind is.
At least with distance, you can get some specific numbers from a few posters. But few really know the changes in elevation they are doing. Still, sometimes a person will give the percent grade and now that I can at least approximate my grades, I can tell how I compare a bit better.
This may mean more to me than to some others because I'm almost always riding alone so I don't get to make direct comparisons to other riders.
Thanks for the insights.
Bob
Ultimately, the main thing I want to be able to do is make comparisons to others, even if less than perfect. I mean, think how many times people talk about how they had this "big" hill or "long" hill or "steep" hill, etc - even comments about how strong the wind is.
At least with distance, you can get some specific numbers from a few posters. But few really know the changes in elevation they are doing. Still, sometimes a person will give the percent grade and now that I can at least approximate my grades, I can tell how I compare a bit better.
This may mean more to me than to some others because I'm almost always riding alone so I don't get to make direct comparisons to other riders.
Thanks for the insights.
Bob
#36
Hi All,
I had this really accurate and scientific type graph that I knocked up in paintshop that describes exactly what you are after, but it didn't want to attach, so here's the science behind the math, behind the graph:
You take the Length of the hill climbed (L) , divide it by the Time In Total Seconds (TITS) , multiply by the Average Speed Sustained (ASS) , divide by the Average Number of Spanners in a Sidchrome Toolkit (ANSST) , minus the time taken to drink a standard beer (BEER) . I draw your attention to the vital element of the equation here - beer.
GRADE = ((((L / TITS) * ASS) / ANSST) - BEER)
And that's the science behind the math behind the graph. I hope this clears things up.
Colonel
p.s. Just in case I need to spell it out for some - this is commonly referred to as HUMOUR, and yes, I understand that the OP wanted answers, and he already has them in spades. And to you maths nerds out there - don't question the formula, it is infallable.
p.p.s. I like the cyclistats climbing calculator - it looks sexy.
I had this really accurate and scientific type graph that I knocked up in paintshop that describes exactly what you are after, but it didn't want to attach, so here's the science behind the math, behind the graph:
You take the Length of the hill climbed (L) , divide it by the Time In Total Seconds (TITS) , multiply by the Average Speed Sustained (ASS) , divide by the Average Number of Spanners in a Sidchrome Toolkit (ANSST) , minus the time taken to drink a standard beer (BEER) . I draw your attention to the vital element of the equation here - beer.
GRADE = ((((L / TITS) * ASS) / ANSST) - BEER)
And that's the science behind the math behind the graph. I hope this clears things up.
Colonel
p.s. Just in case I need to spell it out for some - this is commonly referred to as HUMOUR, and yes, I understand that the OP wanted answers, and he already has them in spades. And to you maths nerds out there - don't question the formula, it is infallable.
p.p.s. I like the cyclistats climbing calculator - it looks sexy.
#37
Software for Cyclists

Joined: Dec 2003
Posts: 4,618
Likes: 0
From: Redding, California
Bikes: Trek 5200, Specialized MTB
Originally Posted by Colonel
p.p.s. I like the cyclistats climbing calculator - it looks sexy.
I focused on climbing this season, and added that tool to the program when I was doing some planning for the
Death Ride, and the Bicycle Tour of Colorado.
#38
Keep on climbing

Joined: Apr 2004
Posts: 2,193
Likes: 2
From: Marlborough, Massachusetts
Bikes: 2004 Calfee Tetra Pro
Originally Posted by Cranks
I've got one section of a ride in Seattle - 41.9 feet rise over 298.2 ft, which should calculate to a 295.2 ft actual distance? It's part of a bigger hill, but it's a killa.
#39
Bent

Joined: Jul 2004
Posts: 166
Likes: 0
From: San Carlos, CA
Bikes: 2017 Trek FX S 6, 2010 Trek Madone 4.5, 2002 Gary Fisher Sugar 3+, 199? Trek 930 Singletrack
DeLorme TopoMap. Don't know what they use to specify an exact spot - maybe the middle of an intersection? Take it with a grain of salt...
#40
Avatar out of order.

Joined: Apr 2004
Posts: 895
Likes: 0
From: North of the border, just
Bikes: Fuji Absolut '04 / Fuji 'Marlboro' Folder
Originally Posted by CastIron
MAC friendly?
Anyone interested can PM me with their email address.
#41
Here is a website that will do the math for you.
Slope and Distance Calculator
Slope and Distance Calculator






