What are Heart Rate Zones?
Heart rate zones are ranges of your heart rate, expressed as a percentage of your maximum heart rate, that correspond to different levels of exercise intensity. Training within specific zones can help you achieve particular fitness goals:
- Zone 1 (Very Light): 50-60% of Maximum Heart Rate. Aids recovery and is ideal for warm-ups and cool-downs.
- Zone 2 (Light): 60-70% of Maximum Heart Rate. Builds aerobic base and endurance. You can comfortably hold a conversation.
- Zone 3 (Moderate): 70-80% of Maximum Heart Rate. Improves aerobic fitness and endurance. Talking becomes more challenging.
- Zone 4 (Hard): 80-90% of Maximum Heart Rate. Improves anaerobic threshold and speed. Talking in short sentences is possible.
- Zone 5 (Maximum): 90-100% of Maximum Heart Rate. Improves speed and power. Very short bursts of intense effort.
This calculator uses the widely accepted Karvonen Formula, which accounts for your resting heart rate for a more personalized calculation. The formula for Heart Rate Reserve (HRR) is: HRR = Max Heart Rate – Resting Heart Rate. Then, for each zone, you calculate: Target Heart Rate = (HRR * %Intensity) + Resting Heart Rate.
Example Calculation:
Let's say you are 30 years old and your resting heart rate is 60 bpm.
- Maximum Heart Rate (MHR) is typically estimated as 220 – Age. So, 220 – 30 = 190 bpm.
- Heart Rate Reserve (HRR) is MHR – Resting Heart Rate. So, 190 – 60 = 130 bpm.
- Zone 1 (50-60%): (130 * 0.50) + 60 = 125 bpm to (130 * 0.60) + 60 = 138 bpm.
- Zone 2 (60-70%): (130 * 0.60) + 60 = 138 bpm to (130 * 0.70) + 60 = 151 bpm.
- Zone 3 (70-80%): (130 * 0.70) + 60 = 151 bpm to (130 * 0.80) + 60 = 164 bpm.
- Zone 4 (80-90%): (130 * 0.80) + 60 = 164 bpm to (130 * 0.90) + 60 = 177 bpm.
- Zone 5 (90-100%): (130 * 0.90) + 60 = 177 bpm to (130 * 1.00) + 60 = 190 bpm.
var calculateHeartRateZones = function() {
var age = parseFloat(document.getElementById("age").value);
var restingHeartRate = parseFloat(document.getElementById("restingHeartRate").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = "; // Clear previous results
if (isNaN(age) || isNaN(restingHeartRate) || age <= 0 || restingHeartRate <= 0) {
resultDiv.innerHTML = 'Please enter valid positive numbers for age and resting heart rate.';
return;
}
var maxHeartRate = 220 – age;
var heartRateReserve = maxHeartRate – restingHeartRate;
if (heartRateReserve < 0) {
resultDiv.innerHTML = 'Your resting heart rate seems unusually high for your age. Please check your inputs.';
return;
}
var zones = {
zone1: { min: Math.round(heartRateReserve * 0.50 + restingHeartRate), max: Math.round(heartRateReserve * 0.60 + restingHeartRate) },
zone2: { min: Math.round(heartRateReserve * 0.60 + restingHeartRate), max: Math.round(heartRateReserve * 0.70 + restingHeartRate) },
zone3: { min: Math.round(heartRateReserve * 0.70 + restingHeartRate), max: Math.round(heartRateReserve * 0.80 + restingHeartRate) },
zone4: { min: Math.round(heartRateReserve * 0.80 + restingHeartRate), max: Math.round(heartRateReserve * 0.90 + restingHeartRate) },
zone5: { min: Math.round(heartRateReserve * 0.90 + restingHeartRate), max: Math.round(heartRateReserve * 1.00 + restingHeartRate) }
};
var outputHTML = '
Your Heart Rate Zones:
';
outputHTML += '
Maximum Heart Rate (MHR): ' + maxHeartRate + ' bpm';
outputHTML += '
Heart Rate Reserve (HRR): ' + heartRateReserve + ' bpm';
outputHTML += '
';
outputHTML += 'Zone 1 (50-60%): ' + zones.zone1.min + ' – ' + zones.zone1.max + ' bpm (Very Light)';
outputHTML += 'Zone 2 (60-70%): ' + zones.zone2.min + ' – ' + zones.zone2.max + ' bpm (Light)';
outputHTML += 'Zone 3 (70-80%): ' + zones.zone3.min + ' – ' + zones.zone3.max + ' bpm (Moderate)';
outputHTML += 'Zone 4 (80-90%): ' + zones.zone4.min + ' – ' + zones.zone4.max + ' bpm (Hard)';
outputHTML += 'Zone 5 (90-100%): ' + zones.zone5.min + ' – ' + zones.zone5.max + ' bpm (Maximum)';
outputHTML += '
';
resultDiv.innerHTML = outputHTML;
};
.calculator-container {
font-family: sans-serif;
display: flex;
flex-wrap: wrap;
gap: 20px;
max-width: 900px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #f9f9f9;
}
.calculator-form {
flex: 1;
min-width: 300px;
padding: 15px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.calculator-form h2 {
margin-top: 0;
color: #333;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
.form-group input[type="number"] {
width: calc(100% – 16px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
.calculator-form button {
background-color: #4CAF50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s ease;
}
.calculator-form button:hover {
background-color: #45a049;
}
.calculator-result {
margin-top: 20px;
padding: 15px;
border: 1px solid #e0e0e0;
border-radius: 5px;
background-color: #f0f0f0;
}
.calculator-result h3 {
margin-top: 0;
color: #333;
margin-bottom: 10px;
}
.zone-list p {
margin-bottom: 8px;
color: #444;
}
.calculator-explanation {
flex: 1.5;
min-width: 300px;
padding: 15px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.calculator-explanation h3 {
color: #333;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
margin-bottom: 20px;
}
.calculator-explanation ul,
.calculator-explanation ol {
padding-left: 20px;
color: #444;
line-height: 1.6;
}
.calculator-explanation li {
margin-bottom: 10px;
}
.calculator-explanation strong {
color: #333;
}