Trail and ultra runners learn quickly that mile count alone is a bad predictor of finish time. A flat 20-miler and a 20-miler with 4,000 feet of climbing are entirely different days, and comparing them by distance alone will get your pacing plan wrong before you start.
Where the rule comes from
William Naismith, a Scottish mountaineer, published a rule in 1892 for estimating hiking time that's still the starting point for endurance sport elevation math today: roughly 1,000 feet of climbing adds the time-equivalent of an extra 1.5 flat miles. It was built for hikers, not runners, but the proportional relationship — climbing costs disproportionately more time than the distance covered suggests — holds up reasonably well as a planning estimate for trail races too.
Later refinements (the Scarf equivalence and various ultrarunning-specific models) adjust the ratio somewhat depending on grade steepness and whether you're running or hiking the climbs, but Naismith's original ratio remains a solid back-of-envelope figure.
Running the numbers
The Elevation Gain Time Cost Calculator takes your total climb and flat-ground pace and estimates the time penalty in flat-mile terms.
Worked example: A trail half marathon with 2,000 feet of total gain, run by someone with an 8:30/mile flat pace, adds roughly 3 flat-mile-equivalents of time from the Naismith ratio — call it around 25-26 extra minutes above what a flat half marathon at that pace would take, before accounting for technical terrain, altitude, or descent-related slowing.
Using it for race planning
This estimate is most valuable used against your own historical splits, not as an absolute prediction. Pull your gain and pace from a past race, see what the model would have predicted, and calibrate the ratio to your own climbing strength — strong hikers on steep grades often beat the Naismith estimate, while runners who try to run every climb and blow up often undershoot it. Once you've calibrated it once against a real result, it becomes a genuinely useful pacing tool for the next unfamiliar course.