To add an empirical thought to the calculation for the basic grade %...
As your grades get steeper (e.g., >2%), you'll need to add extra distance to the 'run' to allow for gradual vertical transitions at the bottom and top of the grades. That is to say, the transitions from level-to-grade, grade-to-level must allow for the equipment you're operating. For instance, steam engines may encounter shorting problems as the engine enters an abrupt transition at the bottom of a grade. In a like manner, the same engine might lose traction on the grade as it reaches a sharp transition at the top, since the leading drivers will lose contact with the rails.
Diesels can have similar problems, but having separate trucks can minimize issues steamers encounter.......as long as the trucks have some amount of vertical swivel.
No rules of thumb come to mind on this transition 'thing', but I've had to make accommodation on at least a couple occasions for this phenom. It adds to the total length of a grade when planning a layout.
BTW, another grade issue is re curves. Besides reducing traction if they're part of the grade, entering/departing a curve at the top or bottom of a grade can also be problematic....another reason for ensuring smooth transitions.
Happy New Year!
KD