From an old post in the Road Forum. The above is NOT the correct way to calculate % grade, at least not exactly.
"Not exactly. Assuming that by "distance" the poster is referring to distance travelled, the correct formula is as follows:
Of course the the ascii slope below is waaay out of proportion, but anyway...
......... /|
........./.|
...D../...| (rise)
...../.....|
.../.......|
./______|
(run)
%grade=100* rise/run
D (distance up the slope) is what your odometer reads and the rise (altitude gain) you get from an altimeter or topo map
therefore: %grade= 100*tan[arcsin(rise/D)]
BTW--%grade can be *very* confusing because it can go from zero to infinity (not what you'd think of for something expressed as a percentage); it took me a while to get this fact throught my thick skull"