Skip to main content
aifithub
Cardio As of 2026-05-08

How Marathon Pace + Elevation Calculator works

Methodology for the Marathon Pace + Elevation Calculator: Riegel formula, Strava grade-adjusted pace asymmetry, and difficulty banding.

Education · Not medical advice. Output is deterministic math from your inputs.Editorial standardsSponsor disclosureCorrections

Scope

Converts a target marathon (or any distance) time into the flat-equivalent pace required, accounting for net elevation gain and loss across the course.

Formula

Average pace = total_seconds / target_distance_km.

Elevation correction:

  • climb_cost_sec = total_elevation_gain_m × 0.30 (3 sec per 10 m of climb)
  • descent_credit_sec = total_elevation_loss_m × 0.15 (1.5 sec per 10 m of descent)
  • net_correction = climb_cost − descent_credit (asymmetric — climbs cost more than descents recover)

Flat-equivalent pace per km = average_pace_per_km − (net_correction / target_distance_km).

Data sources

  1. Riegel PS. Athletic records and human endurance. Am Sci. 1981;69(3):285-290. — The endurance-time fatigue exponent (1.06) used to scale across distances; informs the difficulty banding.
  2. Minetti AE, Moia C, Roi GS, Susta D, Ferretti G. Energy cost of walking and running at extreme uphill and downhill slopes. J Appl Physiol. 2002;93(3):1039-1046. — PMID 12183501. The energy-cost asymmetry between climbing and descending; underpins Strava's GAP model.
  3. Strava — Grade Adjusted Pace developer documentation. — Live formula used by tens of millions of runners; ~3 sec/km per 10 m gain.

Assumptions

  • Net climb / descent are evenly distributed across the course — segment-by-segment topography would refine the per-km splits.
  • Gradient effects are linear in this band; very steep grades (>15%) deviate from the linear model (Minetti 2002 shows quadratic terms above 25% grade).
  • Course distance is accurate to ±100 m; small chip-time vs course-length discrepancies bias the pace.

Approximation range

±5% on flat-equivalent pace for typical road races. Larger errors for trail / mountain courses where surface (technical, scree, mud) compounds the elevation cost.

Limitations

  • Single-segment model — does not output a per-km grade-adjusted pace plan with course profile awareness.
  • Wind, heat, and altitude are not modelled (each can add 1–5% to effective pace).
  • Doesn't account for fitness band — the same elevation costs a 3-h marathoner less than a 5-h marathoner in absolute seconds.

Reproducibility

Marathon (42.195 km) target 4:00:00 (240 min, 14400 s). Average pace = 14400/42.195 = 341.3 s/km = 5:41/km. Elevation +200 m / −200 m: net correction = 200×0.3 − 200×0.15 = 30 s. Flat-equivalent = 341.3 − (30/42.195) = 340.6 s/km ≈ 5:41/km (effectively flat).

Change log

  • 2026-05-08: methodology page first published.

Worked example

Computed by the same engine bundle served at /engines/marathon-pace-elevation.js. Re-runnable: the values below are the literal output of compute(engineInput).

Input

tool
marathon_pace_elevation
target_distance_km
42.195
target_time_minutes
240
total_elevation_gain_m
200
total_elevation_loss_m
200

Output

targetDistanceKm
42.195
targetTimeMinutes
240
averagePaceSecondsPerKm
341
averagePaceLabel
5:41
flatEquivalentPaceSecondsPerKm
341
flatEquivalentPaceLabel
5:41
netElevationCorrectionSeconds
30
segments
[{"segmentKm":1,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":2,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":3,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":4,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":5,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":6,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":7,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":8,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":9,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":10,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":11,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":12,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":13,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":14,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":15,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":16,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":17,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":18,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":19,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":20,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":21,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":22,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":23,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":24,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":25,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":26,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":27,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":28,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":29,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":30,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":31,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":32,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":33,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":34,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":35,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":36,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":37,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":38,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":39,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":40,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":41,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":42,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"},{"segmentKm":42.195,"paceSecondsPerKm":341.2726626377533,"paceLabel":"5:41"}]
difficulty
flat

FAQ

What does the Marathon Pace + Elevation Calculator calculate?
Methodology for the Marathon Pace + Elevation Calculator: Riegel formula, Strava grade-adjusted pace asymmetry, and difficulty banding.
What inputs does the Marathon Pace + Elevation Calculator require?
It takes the following inputs: target distance km, target time minutes, total elevation gain m, total elevation loss m.
What does the Marathon Pace + Elevation Calculator return?
It returns: averagePaceLabel, flatEquivalentPaceLabel, averagePaceSecondsPerKm, flatEquivalentPaceSecondsPerKm, netElevationCorrectionSeconds, difficulty, segments.
Is the Marathon Pace + Elevation Calculator free to use?
Yes. It runs entirely client-side in your browser with no signup, and is also importable as an ES module engine for AI agents.
What category does the Marathon Pace + Elevation Calculator belong to?
Cardio. See the methodology above for formulas, assumptions, and limitations.
General fitness estimates — not medical advice. Consult a healthcare professional for medical decisions.