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) / 100Variables
| Variable | Description | Default |
|---|---|---|
distance_miles | Distance(miles) | 3.1 |
hours | Hours(hr) | 0 |
minutes | Minutes(min) | 25 |
seconds | Seconds(sec) | 0 |
total_seconds | Derived value= hours * 3600 + minutes * 60 + seconds | calculated |
pace_seconds_per_mile | Derived value= total_seconds / distance_miles | calculated |
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
- 01Total time in seconds = 0 * 3600 + 25 * 60 + 0 = 1500 seconds
- 02Pace = 1500 / 3.1 = 483.87 seconds per mile
- 03Minutes portion = floor(483.87 / 60) = 8 min
- 04Seconds remainder = 483.87 - 8 * 60 = 3.87, rounded to 4 sec
- 05Pace = 8:04 per mile
- 06Speed = 3.1 / (1500 / 3600) = 7.44 mph
Ready to run the numbers?
Open Running Pace Calculator