Kelownagirl posted this link a while back (found it through a search). I've found it helpful. Just plug in distance and gain and you get percent grade:

http://www.csgnetwork.com/inclinedeclinegradecalc.html