Calculate Max Aerobic Heart Rate

Maximum Aerobic Heart Rate Calculator

Your maximum aerobic heart rate is the highest heart rate you can achieve during aerobic exercise. It's a crucial metric for understanding your cardiovascular fitness and for setting appropriate training zones. A common and simple method to estimate your maximum heart rate is the "220 minus your age" formula.

.calculator-container { font-family: sans-serif; border: 1px solid #ccc; padding: 20px; border-radius: 8px; max-width: 400px; margin: 20px auto; background-color: #f9f9f9; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .calculator-container h2 { text-align: center; color: #333; margin-bottom: 15px; } .input-section { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; } .input-section label { color: #555; font-weight: bold; } .input-section input[type="number"] { padding: 8px; border: 1px solid #ddd; border-radius: 4px; width: 120px; box-sizing: border-box; } button { display: block; width: 100%; padding: 10px 15px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; transition: background-color 0.2s ease; } button:hover { background-color: #0056b3; } .result-section { margin-top: 20px; padding: 15px; background-color: #e7f3fe; border: 1px solid #b3d7fc; border-radius: 4px; text-align: center; font-size: 18px; color: #004085; font-weight: bold; } function calculateMaxHeartRate() { var ageInput = document.getElementById("age"); var resultDiv = document.getElementById("result"); var age = parseFloat(ageInput.value); if (isNaN(age) || age <= 0) { resultDiv.innerHTML = "Please enter a valid age."; return; } // Formula: Maximum Heart Rate = 220 – Age var maxHeartRate = 220 – age; resultDiv.innerHTML = "Your estimated maximum aerobic heart rate is: " + maxHeartRate + " bpm"; }

Leave a Comment