Understanding your target heart rate zone is crucial for effective cardiovascular exercise. This calculator helps you determine your safe and effective training heart rate based on your age.
years
function calculateTargetHeartRate() {
var age = document.getElementById("age").value;
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(age) || age = 120) {
resultDiv.innerHTML = "Please enter a valid age between 1 and 120.";
return;
}
// Karvonen Formula (commonly used, but simple max HR is often sufficient for basic target HR)
// For simplicity, we'll use the standard estimate: Max Heart Rate = 220 – age
// And then common training zones: Moderate (50-70% of Max HR), Vigorous (70-85% of Max HR)
var maxHeartRate = 220 – age;
var moderateLowerBound = Math.round(maxHeartRate * 0.50);
var moderateUpperBound = Math.round(maxHeartRate * 0.70);
var vigorousLowerBound = Math.round(maxHeartRate * 0.70);
var vigorousUpperBound = Math.round(maxHeartRate * 0.85);
resultDiv.innerHTML =
"