Full Marathon (42.195 km / 26.2 mi)
Half Marathon (21.1 km / 13.1 mi)
10K
5K
Custom Distance
Kilometers
Miles
Minutes per Kilometer (min/km)
Minutes per Mile (min/mi)
Estimated Finish Time
00:00:00
How to Use the Marathon Time Calculator
Planning a marathon requires more than just physical endurance; it requires a strategic pacing plan. This marathon time calculator helps you determine your total finish time based on your target pace per mile or kilometer. Whether you are aiming for a Boston Qualifying time or simply looking to finish your first 26.2, knowing your split goals is essential.
The Formula for Marathon Success
The math behind race timing is straightforward but vital. The formula used is:
Total Time = Total Distance × Pace per Unit
For example, if you run a marathon (42.195 km) at a pace of 5:00 per kilometer:
42.195 kilometers × 5 minutes = 210.975 minutes
210.975 minutes ≈ 3 Hours, 30 Minutes, and 58 Seconds
Understanding Common Pacing Milestones
Many runners set specific goals based on round numbers. Here are some common marathon benchmarks and the paces required to hit them:
Target Time
Pace (min/mile)
Pace (min/km)
3:00:00
6:52
4:16
3:30:00
8:01
4:59
4:00:00
9:09
5:41
4:30:00
10:18
6:24
Tips for Race Day Pacing
Remember that a calculator provides a theoretical time based on a perfectly consistent pace. In a real-world race, factors such as elevation changes, wind, crowd congestion, and fatigue (the "wall" at mile 20) often cause variance. Most elite runners recommend "negative splits," where you run the second half of the marathon slightly faster than the first.
function toggleCustomDistance() {
var select = document.getElementById("raceDistance");
var customRow = document.getElementById("customDistanceRow");
if (select.value === "custom") {
customRow.style.display = "block";
} else {
customRow.style.display = "none";
}
}
function calculateMarathonTime() {
var raceDistSelect = document.getElementById("raceDistance").value;
var paceMin = parseInt(document.getElementById("paceMin").value) || 0;
var paceSec = parseInt(document.getElementById("paceSec").value) || 0;
var paceUnit = document.getElementById("paceUnit").value;
var distance = 0;
var unitLabel = "";
// Determine Distance
if (raceDistSelect === "custom") {
var customVal = parseFloat(document.getElementById("customDist").value);
var customUnit = document.getElementById("customUnit").value;
if (isNaN(customVal) || customVal <= 0) {
alert("Please enter a valid custom distance.");
return;
}
if (paceUnit === "km") {
// Calculator expects distance in same units as pace for simple math
if (customUnit === "miles") {
distance = customVal * 1.60934; // Convert miles to km to match pace
} else {
distance = customVal;
}
unitLabel = "km";
} else {
// Pace is in miles
if (customUnit === "km") {
distance = customVal / 1.60934; // Convert km to miles to match pace
} else {
distance = customVal;
}
unitLabel = "miles";
}
} else {
// Standard presets (values in KM)
var kmDist = parseFloat(raceDistSelect);
if (paceUnit === "mile") {
distance = kmDist / 1.60934;
unitLabel = "miles";
} else {
distance = kmDist;
unitLabel = "km";
}
}
// Math: Time = Distance * Pace
var totalPaceInSeconds = (paceMin * 60) + paceSec;
var totalSeconds = distance * totalPaceInSeconds;
if (totalSeconds <= 0) {
alert("Please enter a valid pace.");
return;
}
// Convert total seconds to HH:MM:SS
var hours = Math.floor(totalSeconds / 3600);
var minutes = Math.floor((totalSeconds % 3600) / 60);
var seconds = Math.floor(totalSeconds % 60);
// Padding for display
var hDisplay = hours < 10 ? "0" + hours : hours;
var mDisplay = minutes < 10 ? "0" + minutes : minutes;
var sDisplay = seconds < 10 ? "0" + seconds : seconds;
document.getElementById("finalTime").innerText = hDisplay + ":" + mDisplay + ":" + sDisplay;
document.getElementById("detailsText").innerText = "Based on a pace of " + paceMin + ":" + (paceSec < 10 ? "0" + paceSec : paceSec) + " per " + (paceUnit === "km" ? "kilometer" : "mile") + " over " + distance.toFixed(2) + " " + unitLabel + ".";
document.getElementById("resultArea").style.display = "block";
}