Knowing your heart rate limits is essential for safe and effective exercise. Whether you are an elite athlete or just starting your fitness journey, monitoring your Beats Per Minute (BPM) ensures you are training at the right intensity to achieve your goals without overstressing your cardiovascular system.
What is Maximum Heart Rate (MHR)?
Your Maximum Heart Rate is the highest number of beats per minute your heart can pump under maximum stress. It is largely determined by genetics and age. As we get older, our MHR naturally decreases. This calculator uses three common formulas to estimate this figure:
Standard Formula: 220 minus your age. This is the most widely used method for general fitness.
Tanaka Formula: 208 – (0.7 × age). Often considered more accurate for adults over age 40.
Gellish Formula: 207 – (0.7 × age). Another refined method widely used in sports science.
Resting Heart Rate and The Karvonen Method
While MHR sets your ceiling, your Resting Heart Rate (RHR) sets the floor. RHR is best measured in the morning before you get out of bed. If you enter your RHR in the calculator above, we use the Karvonen Method.
The Karvonen Method calculates your "Heart Rate Reserve" (HRR), which is the difference between your Max and Resting rates. Training zones calculated using HRR are often more personalized because they account for your specific fitness level.
Heart Rate Training Zones Explained
Your "min and max" for exercise depends on what you want to achieve. Here is a breakdown of the zones calculated above:
Zone 1 (Very Light): Great for warm-ups and recovery. Improves overall health and helps recovery.
Zone 2 (Light): The "Fat Burning" zone. Improves basic endurance and fat metabolism.
Zone 3 (Moderate): Improves aerobic fitness. This is often the target "min and max" range for general cardio health.
Zone 4 (Hard): Increases maximum performance capacity for shorter sessions.
Zone 5 (Maximum): Develops maximum performance and speed. Only sustainable for very short intervals.
Safety First
Before starting any new exercise program, especially if you have a history of heart conditions, consult with a healthcare professional. These numbers are estimates and individual variations apply.
function calculateHeartRate() {
// 1. Get Inputs
var ageInput = document.getElementById('userAge');
var rhrInput = document.getElementById('restingHR');
var formulaSelect = document.getElementById('formulaType');
var age = parseFloat(ageInput.value);
var rhr = parseFloat(rhrInput.value);
var formula = formulaSelect.value;
var useKarvonen = false;
// 2. Validation
if (isNaN(age) || age 120) {
alert("Please enter a valid age between 1 and 120.");
return;
}
// Check if RHR is provided for Karvonen method
if (!isNaN(rhr) && rhr > 20 && rhr < 200) {
useKarvonen = true;
}
// 3. Calculate Max Heart Rate (MHR)
var mhr = 0;
if (formula === 'tanaka') {
mhr = 208 – (0.7 * age);
} else if (formula === 'gellish') {
mhr = 207 – (0.7 * age);
} else {
// Standard
mhr = 220 – age;
}
mhr = Math.round(mhr);
// 4. Calculate Zones
// Zones are defined as percentage ranges:
// 1: 50-60%, 2: 60-70%, 3: 70-80%, 4: 80-90%, 5: 90-100%
var zones = [];
var percentages = [
{ min: 0.50, max: 0.60, label: "Zone 1", class: "zone-1", desc: "Warm Up / Recovery" },
{ min: 0.60, max: 0.70, label: "Zone 2", class: "zone-2", desc: "Fat Burning" },
{ min: 0.70, max: 0.80, label: "Zone 3", class: "zone-3", desc: "Aerobic / Cardio" },
{ min: 0.80, max: 0.90, label: "Zone 4", class: "zone-4", desc: "Anaerobic / Hard" },
{ min: 0.90, max: 1.00, label: "Zone 5", class: "zone-5", desc: "Maximum Effort" }
];
var hrr = 0;
if (useKarvonen) {
// Heart Rate Reserve Formula: TargetHR = ((MHR – RHR) * %Intensity) + RHR
hrr = mhr – rhr;
document.getElementById('methodUsed').innerText = "Heart Rate Reserve (Karvonen Method)";
} else {
// Standard Percentage Formula: TargetHR = MHR * %Intensity
document.getElementById('methodUsed').innerText = "Standard Percentage of Max HR";
}
// Generate Calculation Data
for (var i = 0; i < percentages.length; i++) {
var p = percentages[i];
var minBpm, maxBpm;
if (useKarvonen) {
minBpm = Math.round((hrr * p.min) + rhr);
maxBpm = Math.round((hrr * p.max) + rhr);
} else {
minBpm = Math.round(mhr * p.min);
maxBpm = Math.round(mhr * p.max);
}
zones.push({
label: p.label,
cls: p.class,
desc: p.desc,
pct: (p.min * 100) + "% – " + (p.max * 100) + "%",
min: minBpm,
max: maxBpm
});
}
// 5. Update UI
// Display MHR
document.getElementById('displayMHR').innerText = mhr;
// Display Target Range (Zone 3 – Aerobic is usually the standard 'Target')
// We will show Zone 2 min to Zone 3 max as a general "Moderate" range
var targetMin = zones[1].min; // Zone 2 min
var targetMax = zones[2].max; // Zone 3 max
document.getElementById('displayTarget').innerText = targetMin + " – " + targetMax;
// Build Table
var tableBody = document.getElementById('zonesTableBody');
tableBody.innerHTML = ""; // Clear previous results
for (var j = 0; j < zones.length; j++) {
var z = zones[j];
var row = "
";
row += "
" + z.label + "
";
row += "
" + z.pct + "
";
row += "
" + z.min + " bpm
";
row += "
" + z.max + " bpm
";
row += "
" + z.desc + "
";
row += "
";
tableBody.innerHTML += row;
}
// Show Results
document.getElementById('resultSection').style.display = "block";
// Scroll to results
document.getElementById('resultSection').scrollIntoView({behavior: 'smooth'});
}