
Running pace calculator
Calculate pace per kilometre or mile and average speed from a distance and elapsed time.
Your inputs stay in your browser.
Method and assumptions
Method version 1.0.0 · Updated
Calculate my pace
Formula: Pace = elapsed time ÷ distance; speed = distance ÷ elapsed time.
This gives an average and does not predict future performance.
- distance
- Distance
- distanceUnit
- Distance unit
- durationMinutes
- Whole minutes
- durationSeconds
- Seconds (0 to less than 60)
Enter a distance of at least 0.01 km or miles and an elapsed time greater than zero. Conversions use the international mile (1 mi = 1.609344 km). Displayed pace is rounded to the nearest second; speed to six decimal places.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const minutes = 25, kilometers = 5;
const pace = minutes / kilometers;
console.log(`${Math.floor(pace)}:${String(Math.round((pace % 1) * 60)).padStart(2, "0")} min/km`); // 5:00 min/kmTypeScript
const minutes = 25, kilometers = 5;
const pace = minutes / kilometers;
console.log(`${Math.floor(pace)}:${String(Math.round((pace % 1) * 60)).padStart(2, "0")} min/km`); // 5:00 min/kmPython
minutes, km = 25, 5
pace = minutes / km
print(f"{int(pace)}:{round((pace % 1) * 60):02d} min/km") # 5:00 min/kmJava
double pace = 25.0 / 5;
System.out.printf("%d:%02d min/km%n", (int) pace, Math.round((float) ((pace % 1) * 60))); // 5:00C#
double pace = 25.0 / 5;
Console.WriteLine($"{(int)pace}:{Math.Round((pace % 1) * 60):00} min/km"); // 5:00