Skip to main content
AI Fit Hub

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

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

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.