Marathon Pace Calculator Formula

Understand the math behind the marathon pace calculator. Each variable explained with a worked example.

Formulas Used

Pace (min/mile)

pace_min_part = floor(pace_per_mile)

Pace (sec remainder)

pace_sec_part = round((pace_per_mile - floor(pace_per_mile)) * 60)

Pace (min/km)

pace_per_km = round(total_minutes / 42.195 * 100) / 100

Half Marathon Split

half_split = round(total_minutes / 2 * 100) / 100

Variables

VariableDescriptionDefault
target_hoursTarget Hours(hr)4
target_minutesTarget Minutes(min)0
total_minutesDerived value= target_hours * 60 + target_minutescalculated
pace_per_mileDerived value= total_minutes / 26.2calculated

How It Works

How Marathon Pace Is Calculated

A marathon is 26.2 miles (42.195 km). To find the pace needed for a target finish time, simply divide.

Formula

Pace (min/mile) = Total Time (minutes) / 26.2

Pacing Strategy

Most coaches recommend even splits or a slight negative split (running the second half slightly faster). Going out too fast leads to significant slowdowns after mile 20.

Worked Example

You want to finish a marathon in 4 hours.

target_hours = 4target_minutes = 0
  1. 01Total time = 4 * 60 + 0 = 240 minutes
  2. 02Pace = 240 / 26.2 = 9.16 min/mile
  3. 03That is 9 minutes and 10 seconds per mile
  4. 04Half marathon split = 240 / 2 = 120 minutes (2:00:00)

Ready to run the numbers?

Open Marathon Pace Calculator