Your card

A 4:00 marathon with 200 m of climbing and 200 m of descent runs at a flat-equivalent pace of 5:38 per km.

Cardio

Marathon Pace + Elevation Calculator

Turn a target race time on a hilly course into your average race pace and the flat-course pace that takes the same effort.

Your numbers

Start from an example

Units
km

Marathon 42.195 km (26.2 mi), half 21.1 km (13.1 mi).

Target time (h:mm)

Type 3:30 or 3:30:00.

m

The course total from your watch, Strava or the race site, not the net change.

m

The course total from your watch, Strava or the race site, not the net change.

Result

Flat-equivalent pace
5:38 /km
Average race pace
5:41 /km
Elevation cost
+150 s
Course
Flat

Average vs flat-equivalent pace

Race-day pace vs the flat-course pace that takes the same effort.

Average pace
5:41 /km
Flat-equivalent pace
5:38 /km

Education, not medical advice. The result comes only from the published formula and your inputs. How we check our formulas.

  • Nutrition TDEE Calculator

    Estimate your daily energy expenditure with Mifflin-St Jeor + activity factors.

  • Nutrition Macro Calculator

    Convert calorie targets into protein, carbs, and fat grams for your goal.

  • Planning Calorie Deficit Calculator

    Estimate required daily calorie deficit for a target timeline and bodyweight change.

  • Planning Body Recomposition Planner

    Plan body-fat reduction pace, deficit targets, and protein needs around a timeline.

All articles

Receipt

A 4:00 marathon with 200 m of climbing and 200 m of descent runs at a flat-equivalent pace of 5:38 per km.

Distance
42.2
Target time
240
Total elevation gain
200
Total elevation loss
200

Method and sources. Minetti A.E., Moia C., Roi G.S. et al. (2002) Energy cost of walking and running at extreme uphill and downhill slopes, J Appl Physiol 93(3):1039-1046.

Use it from an agent or code

Any agent can run this calculator by URL: put the inputs in the query string and get JSON back, with the inputs that used defaults and a line to cite (add format=md for markdown). MCP clients reach it through https://aifithub.io/mcp.

https://aifithub.io/api/run/marathon-pace-elevation?target_distance_km=42.195&target_time_minutes=240&total_elevation_gain_m=200&total_elevation_loss_m=200

The example's answer as JSON, from a shell:

curl -s 'https://aifithub.io/api/run/marathon-pace-elevation?target_distance_km=42.195&target_time_minutes=240&total_elevation_gain_m=200&total_elevation_loss_m=200'

Over MCP (POST https://aifithub.io/mcp):

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"run_calculator","arguments":{"calculator":"marathon-pace-elevation","input":{"target_distance_km":42.195,"target_time_minutes":240,"total_elevation_gain_m":200,"total_elevation_loss_m":200}}}}

In code, import the same module; it runs where you import it, with no request or key.

import { compute } from "https://aifithub.io/engines/marathon-pace-elevation.js";

Input and output contract, TypeScript types and the guide for agents.