Hiking Time Calculator Formula

Understand the math behind the hiking time calculator. Each variable explained with a worked example.

Formulas Used

Moving Time

moving_time = round((flat_time_hr + climb_time_hr) * fitness_factor * 10) / 10

Total Time (with breaks)

total_time = round((flat_time_hr + climb_time_hr) * fitness_factor * 1.2 * 10) / 10

Average Moving Speed

avg_speed = round(distance_miles / ((flat_time_hr + climb_time_hr) * fitness_factor) * 10) / 10

Variables

VariableDescriptionDefault
distance_milesTrail Distance(miles)8
elevation_gain_ftTotal Elevation Gain(ft)2000
fitness_factorFitness Level1
flat_time_hrDerived value= distance_miles / 3calculated
climb_time_hrDerived value= elevation_gain_ft / 2000calculated

How It Works

How Hiking Time Is Estimated

Naismith's Rule

Developed in 1892 by Scottish mountaineer William Naismith:

Time = Distance / Speed + Elevation Gain / Climbing Rate

  • Flat walking speed: ~3 miles per hour
  • Climbing rate: ~2,000 ft per hour (adds time for elevation gain)
  • Adjustments

  • Fitness factor: Adjusts for individual speed
  • Break time: Add 20% for rest stops, water breaks, photos, and navigation
  • Descent: Steep descents are almost as slow as climbing. This calculator focuses on ascent.
  • Worked Example

    Estimate time for an 8-mile trail with 2,000 ft elevation gain, average fitness.

    distance_miles = 8elevation_gain_ft = 2000fitness_factor = 1
    1. 01Flat time = 8 / 3 = 2.67 hours.
    2. 02Climb time = 2000 / 2000 = 1.0 hours.
    3. 03Moving time = (2.67 + 1.0) x 1 = 3.67 hours.
    4. 04Total with breaks = 3.67 x 1.2 = 4.4 hours.
    5. 05Average speed = 8 / 3.67 = 2.2 mph.

    Ready to run the numbers?

    Open Hiking Time Calculator