Running Pace Calculator Formula

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

Formulas Used

Pace (min/mile)

pace_min = floor(pace_seconds_per_mile / 60)

Pace (sec remainder)

pace_sec = round(pace_seconds_per_mile - floor(pace_seconds_per_mile / 60) * 60)

Speed

speed_mph = distance_miles / (total_seconds / 3600)

Pace (min/km)

pace_per_km = round(pace_seconds_per_mile / 1.60934 / 60 * 100) / 100

Variables

VariableDescriptionDefault
distance_milesDistance(miles)3.1
hoursHours(hr)0
minutesMinutes(min)25
secondsSeconds(sec)0
total_secondsDerived value= hours * 3600 + minutes * 60 + secondscalculated
pace_seconds_per_mileDerived value= total_seconds / distance_milescalculated

How It Works

How Running Pace Is Calculated

Running pace tells you how long it takes to cover one mile (or kilometer).

Formula

Pace (sec/mile) = Total Time (seconds) / Distance (miles)

Convert the resulting seconds into minutes and seconds for a readable pace. Divide by 1.609 to get the per-kilometer pace.

Why Pace Matters

Pace is the standard metric for distance runners. Knowing your pace helps you set realistic race goals, maintain even effort during training, and compare performances across different distances.

Worked Example

You ran 3.1 miles (a 5K) in 25 minutes flat.

distance_miles = 3.1hours = 0minutes = 25seconds = 0
  1. 01Total time in seconds = 0 * 3600 + 25 * 60 + 0 = 1500 seconds
  2. 02Pace = 1500 / 3.1 = 483.87 seconds per mile
  3. 03Minutes portion = floor(483.87 / 60) = 8 min
  4. 04Seconds remainder = 483.87 - 8 * 60 = 3.87, rounded to 4 sec
  5. 05Pace = 8:04 per mile
  6. 06Speed = 3.1 / (1500 / 3600) = 7.44 mph

Frequently Asked Questions

What is a good running pace for beginners?

Most beginners run between 10:00 and 13:00 per mile. Focus on completing the distance comfortably before worrying about pace.

How do I convert pace per mile to pace per kilometer?

Divide your pace in seconds per mile by 1.60934 to get seconds per kilometer, then convert to minutes and seconds.

Does running pace change with terrain?

Yes. Hills, trails, and soft surfaces slow your pace. Expect 30-60 seconds per mile slower on hilly routes compared to flat roads.

Learn More

Guide

Running Pace Calculator Guide: How to Find and Improve Your Pace

Learn how to calculate running pace, understand pace vs. speed, set race targets, and use pace training to improve your performance at every distance from 5K to marathon.

Ready to run the numbers?

Open Running Pace Calculator