Target Heart Rate Calculator for Weight Loss | Calculate Your Zone
:root {
–primary-color: #004a99;
–success-color: #28a745;
–background-color: #f8f9fa;
–text-color: #333;
–border-color: #ddd;
–card-background: #fff;
–shadow: 0 4px 8px rgba(0,0,0,0.1);
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(–background-color);
color: var(–text-color);
line-height: 1.6;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
.container {
width: 100%;
max-width: 960px;
margin: 20px auto;
padding: 20px;
background-color: var(–card-background);
border-radius: 8px;
box-shadow: var(–shadow);
}
h1, h2, h3 {
color: var(–primary-color);
text-align: center;
}
h1 {
margin-bottom: 10px;
}
.subtitle {
text-align: center;
color: #555;
font-size: 1.1em;
margin-bottom: 30px;
}
.calculator-section {
background-color: var(–card-background);
padding: 30px;
border-radius: 8px;
box-shadow: var(–shadow);
margin-bottom: 30px;
}
.input-group {
margin-bottom: 20px;
text-align: left;
}
.input-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: var(–primary-color);
}
.input-group input[type="number"],
.input-group select {
width: calc(100% – 22px);
padding: 10px;
border: 1px solid var(–border-color);
border-radius: 4px;
font-size: 1em;
box-sizing: border-box;
}
.input-group .helper-text {
font-size: 0.85em;
color: #666;
margin-top: 5px;
display: block;
}
.error-message {
color: #dc3545;
font-size: 0.85em;
margin-top: 5px;
display: none; /* Hidden by default */
}
.button-group {
display: flex;
justify-content: space-between;
margin-top: 25px;
gap: 10px;
}
button {
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1em;
font-weight: bold;
transition: background-color 0.3s ease;
}
.btn-primary {
background-color: var(–primary-color);
color: white;
}
.btn-primary:hover {
background-color: #003366;
}
.btn-secondary {
background-color: #6c757d;
color: white;
}
.btn-secondary:hover {
background-color: #5a6268;
}
.btn-success {
background-color: var(–success-color);
color: white;
}
.btn-success:hover {
background-color: #218838;
}
.results-section {
background-color: var(–card-background);
padding: 30px;
border-radius: 8px;
box-shadow: var(–shadow);
margin-top: 30px;
text-align: center;
}
#results-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-top: 20px;
text-align: center;
}
.result-card {
background-color: var(–background-color);
padding: 15px;
border-radius: 6px;
border: 1px solid var(–border-color);
}
.result-card h3 {
margin-top: 0;
font-size: 1.1em;
color: var(–primary-color);
}
.result-card .value {
font-size: 2em;
font-weight: bold;
color: var(–primary-color);
display: block;
margin-top: 5px;
}
.result-card .unit {
font-size: 0.9em;
color: #555;
}
#primary-result {
background-color: var(–success-color);
color: white;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
box-shadow: var(–shadow);
}
#primary-result h3 {
color: white;
margin-bottom: 10px;
}
#primary-result .value {
font-size: 2.8em;
color: white;
}
.formula-explanation {
font-size: 0.9em;
color: #555;
margin-top: 15px;
padding: 10px;
background-color: #e9ecef;
border-radius: 4px;
text-align: left;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
box-shadow: var(–shadow);
}
th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid var(–border-color);
}
thead {
background-color: var(–primary-color);
color: white;
}
tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
caption {
font-size: 1.1em;
font-weight: bold;
color: var(–primary-color);
margin-bottom: 10px;
caption-side: top;
text-align: left;
}
canvas {
display: block;
margin: 20px auto;
background-color: var(–card-background);
border-radius: 8px;
box-shadow: var(–shadow);
}
.article-content {
background-color: var(–card-background);
padding: 30px;
border-radius: 8px;
box-shadow: var(–shadow);
margin-top: 30px;
text-align: left;
}
.article-content h2 {
text-align: left;
margin-top: 30px;
border-bottom: 2px solid var(–primary-color);
padding-bottom: 5px;
}
.article-content h3 {
text-align: left;
margin-top: 25px;
color: #0056b3;
}
.article-content p, .article-content ul, .article-content ol {
margin-bottom: 15px;
}
.article-content ul, .article-content ol {
padding-left: 25px;
}
.article-content li {
margin-bottom: 8px;
}
.faq-item {
margin-bottom: 15px;
border-left: 3px solid var(–primary-color);
padding-left: 15px;
}
.faq-item strong {
display: block;
color: var(–primary-color);
margin-bottom: 5px;
}
.internal-links {
margin-top: 30px;
padding: 20px;
background-color: #e9ecef;
border-radius: 8px;
}
.internal-links h3 {
text-align: left;
margin-top: 0;
margin-bottom: 15px;
}
.internal-links ul {
list-style: none;
padding: 0;
}
.internal-links li {
margin-bottom: 10px;
}
.internal-links a {
color: var(–primary-color);
text-decoration: none;
font-weight: bold;
}
.internal-links a:hover {
text-decoration: underline;
}
.internal-links p {
font-size: 0.9em;
color: #555;
margin-top: 5px;
}
.highlight {
background-color: yellow;
font-weight: bold;
}
@media (max-width: 768px) {
.container {
margin: 10px;
padding: 15px;
}
.button-group {
flex-direction: column;
}
button {
width: 100%;
}
#results-container {
grid-template-columns: 1fr;
}
}
Calculate Your Target Heart Rate Zone
Your Target Heart Rate Results
Target Heart Rate Zone
— bpm
beats per minute
Estimated Max Heart Rate (MHR)
—
bpm
Heart Rate Reserve (HRR)
—
bpm
Lower Target Zone (50%)
—
bpm
Upper Target Zone (85%)
—
bpm
Formula Used (Karvonen Formula):
Target Heart Rate = [(Max Heart Rate – Resting Heart Rate) * % Intensity] + Resting Heart Rate
Max Heart Rate (MHR) is often estimated as 220 – Age.
Heart Rate Zones for Weight Loss
Heart Rate Zone Breakdown
| Zone |
Intensity Range |
Heart Rate (bpm) |
| Resting |
0-49% |
— |
| Moderate (Fat Burn) |
50-70% |
— |
| Vigorous (Cardio) |
70-85% |
— |
| Max Effort |
85%+ |
— |
What is Target Heart Rate for Weight Loss?
The target heart rate for weight loss refers to a specific range of heartbeats per minute that an individual should aim for during aerobic exercise to maximize calorie expenditure and fat burning. It's a personalized metric, calculated based on factors like age, resting heart rate, and desired exercise intensity. Understanding and training within your target heart rate zone ensures your workouts are effective, safe, and contribute optimally to your weight loss goals. It's not just about working out harder, but working out smarter by targeting the most metabolically active heart rate ranges.
Who should use it: Anyone looking to lose weight through exercise, improve cardiovascular fitness, or optimize their training intensity. This includes beginners starting their fitness journey, individuals returning to exercise, and seasoned athletes aiming to fine-tune their training. It's particularly useful for those who want a quantifiable way to gauge the effectiveness of their cardio sessions.
Common misconceptions: A common misconception is that higher heart rates always mean more fat burning. While vigorous intensity burns more calories per minute, moderate intensity (often within the target heart rate zone for weight loss) can be sustained for longer periods, potentially leading to greater overall fat burn. Another myth is that a single formula fits everyone; individual factors like fitness level and medications can affect heart rate, making personalized calculations crucial.
Target Heart Rate for Weight Loss Formula and Mathematical Explanation
The most widely accepted method for calculating target heart rate zones, especially when considering individual fitness levels, is the Karvonen Formula. This formula accounts for your Heart Rate Reserve (HRR), which is the difference between your maximum heart rate and your resting heart rate. Using HRR provides a more accurate and personalized target zone than simpler formulas.
Step-by-step derivation:
- Estimate Maximum Heart Rate (MHR): The most common formula is 220 minus your age. While simple, it's an estimate and can vary.
- Measure Resting Heart Rate (RHR): Measure your pulse when you are fully relaxed, typically first thing in the morning before getting out of bed.
- Calculate Heart Rate Reserve (HRR): HRR = MHR – RHR. This represents the range of heartbeats available for exercise.
- Determine Target Heart Rate (THR): THR = (HRR * % Intensity) + RHR. You'll calculate this for different intensity levels (e.g., 50%, 70%, 85%).
Variable explanations:
| Variable |
Meaning |
Unit |
Typical Range |
| Age |
Your current age in years. |
Years |
18 – 80+ |
| Resting Heart Rate (RHR) |
Heartbeats per minute when at complete rest. |
bpm |
40 – 100 bpm (lower generally indicates better fitness) |
| Estimated Max Heart Rate (MHR) |
The theoretical highest number of times your heart can beat per minute during maximal exertion. |
bpm |
~140 – 200 bpm (decreases with age) |
| Heart Rate Reserve (HRR) |
The difference between MHR and RHR, representing the available heart rate range for exercise. |
bpm |
~100 – 160 bpm |
| % Intensity |
The percentage of your Heart Rate Reserve you aim to work at during exercise. |
% |
Typically 50% – 85% for weight loss and cardio benefits. |
| Target Heart Rate (THR) |
The calculated heart rate range to aim for during exercise based on intensity. |
bpm |
Varies based on age, RHR, and intensity. |
Practical Examples (Real-World Use Cases)
Let's illustrate with two examples using the target heart rate calculator for weight loss:
Example 1: Sarah, a 30-year-old beginner
- Inputs: Age = 30, Resting Heart Rate = 75 bpm, Intensity = Moderate (65%)
- Calculations:
- Estimated MHR = 220 – 30 = 190 bpm
- HRR = 190 – 75 = 115 bpm
- Target Heart Rate = (115 * 0.65) + 75 = 74.75 + 75 = 149.75 bpm
- Results: Sarah's target heart rate for moderate-intensity exercise is approximately 150 bpm. This zone is ideal for building an aerobic base and burning fat efficiently without overexerting herself as she starts her fitness journey.
Example 2: Mark, a 45-year-old intermediate exerciser
- Inputs: Age = 45, Resting Heart Rate = 60 bpm, Intensity = Vigorous (80%)
- Calculations:
- Estimated MHR = 220 – 45 = 175 bpm
- HRR = 175 – 60 = 115 bpm
- Target Heart Rate = (115 * 0.80) + 60 = 92 + 60 = 152 bpm
- Results: Mark's target heart rate for vigorous-intensity exercise is approximately 152 bpm. This higher intensity zone is effective for improving cardiovascular capacity and burning a significant number of calories in a shorter time, suitable for his current fitness level.
How to Use This Target Heart Rate Calculator for Weight Loss
Using the target heart rate calculator for weight loss is straightforward and provides valuable insights for your fitness routine.
- Enter Your Age: Input your current age in years. This is a primary factor in estimating your maximum heart rate.
- Measure Your Resting Heart Rate (RHR): Before using the calculator, take your pulse when you are completely at rest (e.g., upon waking). Enter this value in beats per minute (bpm). A lower RHR generally indicates better cardiovascular fitness.
- Select Intensity Level: Choose the desired intensity for your workout. 'Moderate' (typically 50-70% of MHR) is great for sustained fat burning and endurance, while 'Vigorous' (70-85% of MHR) is more challenging, improves aerobic capacity, and burns more calories per minute.
- Click 'Calculate': The calculator will instantly display your estimated Maximum Heart Rate (MHR), Heart Rate Reserve (HRR), and your specific target heart rate zone based on your selected intensity.
How to read results: The primary result shows your target heart rate zone for the selected intensity. The intermediate values (MHR, HRR, lower/upper zones) provide context. Use a heart rate monitor or manually check your pulse during exercise to stay within your calculated target zone.
Decision-making guidance: If your goal is primarily fat loss and you're starting out, aim for the moderate zone. If you're looking to improve speed and endurance or burn calories quickly, the vigorous zone might be more appropriate. Always listen to your body and consult a healthcare professional if you have any concerns.
Key Factors That Affect Target Heart Rate Results
While the target heart rate calculator for weight loss provides a personalized estimate, several factors can influence your actual heart rate response during exercise:
- Fitness Level: As fitness improves, your RHR tends to decrease, and your MHR might slightly increase or become more efficient. A fitter individual may need to work at a higher intensity percentage to reach the same heart rate as a less fit person.
- Medications: Certain medications, particularly beta-blockers, are designed to lower heart rate and can significantly impact your calculated target zones. Always consult your doctor if you are on medication.
- Hydration Levels: Dehydration can cause your heart rate to increase at any given level of exertion because your blood volume decreases, making your heart work harder.
- Environmental Conditions: Exercising in hot or humid weather can elevate your heart rate as your body works harder to cool itself. Altitude can also affect heart rate.
- Stress and Fatigue: High levels of stress or general fatigue can elevate your resting and exercise heart rates.
- Body Temperature: An increase in body temperature, whether from the environment or illness, can raise your heart rate.
- Individual Physiology: The MHR formula (220 – Age) is a population average. Individual maximum heart rates can vary significantly due to genetics and other unknown physiological factors.
- Type of Exercise: Different activities engage different muscle groups and cardiovascular demands. For example, swimming might result in a slightly lower heart rate compared to running at the same perceived exertion.
Frequently Asked Questions (FAQ)
Q1: Is the 220 – Age formula accurate for everyone?
A: It's a widely used estimate, but individual maximum heart rates can vary. Some people have naturally higher or lower MHRs. For precise training, a supervised maximal exercise test is the most accurate method, but 220 – Age is sufficient for general fitness and weight loss guidance.
Q2: What is the best heart rate zone for burning fat?
A: The moderate intensity zone (typically 50-70% of MHR) is often cited as the "fat-burning zone" because a higher percentage of calories burned during exercise at this intensity come from fat. However, higher intensity workouts burn more total calories, which also contributes significantly to fat loss.
Q3: How often should I check my heart rate during a workout?
A: Check periodically, perhaps every 5-10 minutes, or after significant changes in intensity. Don't obsess over the numbers; use them as a guide. Also, pay attention to your Rate of Perceived Exertion (RPE).
Q4: My resting heart rate is very high/low. What does this mean?
A: A very low RHR (below 40 bpm) might indicate excellent cardiovascular fitness (athlete's heart) but could also signal a medical issue. A very high RHR (above 100 bpm) could be due to fitness, stress, illness, or a medical condition. Consult a doctor if you have concerns.
Q5: Can I use this calculator if I take heart medication?
A: It's strongly recommended to consult your doctor before using this calculator or starting any new exercise program if you are on heart medication, as drugs like beta-blockers can significantly alter your heart rate response.
Q6: What's the difference between using MHR and HRR for target zones?
A: The MHR method is simpler (just uses age), but the HRR (Karvonen) method is more personalized because it incorporates your RHR, providing a more accurate reflection of your individual fitness level and available cardiovascular capacity.
Q7: How long should I stay in my target heart rate zone?
A: For weight loss and cardiovascular benefits, aim for at least 150 minutes of moderate-intensity aerobic activity or 75 minutes of vigorous-intensity activity per week, spread throughout the week. Duration depends on your goals and fitness level.
Q8: Does my target heart rate change as I get fitter?
A: Yes. As your cardiovascular fitness improves, your resting heart rate typically decreases, and your heart becomes more efficient. This means you might need to increase the intensity percentage or duration to achieve the same training effect or reach your target heart rate zone.
Related Tools and Internal Resources
-
BMI Calculator
Calculate your Body Mass Index (BMI) to understand your weight category and its relation to health risks.
-
Calorie Calculator
Estimate your daily calorie needs based on your Basal Metabolic Rate (BMR) and activity level for weight management.
-
Water Intake Calculator
Determine your optimal daily water intake based on your body weight, activity level, and climate.
-
Macronutrient Calculator
Find the ideal balance of protein, carbohydrates, and fats for your diet based on your goals.
-
Benefits of Proper Hydration
Learn why staying hydrated is crucial for overall health, weight loss, and exercise performance.
-
Best Cardio Exercises for Weight Loss
Discover effective cardiovascular exercises that help you burn calories and achieve your weight loss targets.
var ageInput = document.getElementById('age');
var rhrInput = document.getElementById('restingHeartRate');
var intensitySelect = document.getElementById('intensityLevel');
var ageError = document.getElementById('ageError');
var rhrError = document.getElementById('restingHeartRateError');
var primaryResultValue = document.querySelector('#primary-result .value');
var mhrResultValue = document.querySelectorAll('.result-card .value')[0];
var hrrResultValue = document.querySelectorAll('.result-card .value')[1];
var lowerZoneResultValue = document.querySelectorAll('.result-card .value')[2];
var upperZoneResultValue = document.querySelectorAll('.result-card .value')[3];
var restRateRow = document.getElementById('restRateRow');
var moderateZoneRow = document.getElementById('moderateZoneRow');
var vigorousZoneRow = document.getElementById('vigorousZoneRow');
var maxEffortRow = document.getElementById('maxEffortRow');
var heartRateChart;
var chartContext;
function validateInput(inputElement, errorElement, minValue, maxValue, errorMessage) {
var value = parseFloat(inputElement.value);
var isValid = true;
if (isNaN(value) || inputElement.value.trim() === "") {
errorElement.textContent = "This field is required.";
errorElement.style.display = 'block';
isValid = false;
} else if (value maxValue) {
errorElement.textContent = errorMessage;
errorElement.style.display = 'block';
isValid = false;
} else {
errorElement.textContent = "";
errorElement.style.display = 'none';
}
return isValid;
}
function calculateTargetHeartRate() {
var age = parseFloat(ageInput.value);
var restingHeartRate = parseFloat(rhrInput.value);
var intensity = intensitySelect.value;
var ageValid = validateInput(ageInput, ageError, 1, 120, "Age must be between 1 and 120.");
var rhrValid = validateInput(rhrInput, rhrError, 30, 200, "Resting Heart Rate must be between 30 and 200 bpm.");
if (!ageValid || !rhrValid) {
clearResults();
return;
}
var maxHeartRate = 220 – age;
var heartRateReserve = maxHeartRate – restingHeartRate;
var intensityPercentage;
var intensityLabel = "";
if (intensity === "moderate") {
intensityPercentage = 0.65; // Mid-point of 50-70%
intensityLabel = "Moderate (50-70%)";
} else { // vigorous
intensityPercentage = 0.775; // Mid-point of 70-85%
intensityLabel = "Vigorous (70-85%)";
}
var targetHeartRate = Math.round((heartRateReserve * intensityPercentage) + restingHeartRate);
var lowerZonePercentage = 0.50;
var upperZonePercentage = 0.85;
var lowerTargetHR = Math.round((heartRateReserve * lowerZonePercentage) + restingHeartRate);
var upperTargetHR = Math.round((heartRateReserve * upperZonePercentage) + restingHeartRate);
// Update primary result
primaryResultValue.textContent = targetHeartRate;
// Update intermediate results
mhrResultValue.textContent = maxHeartRate;
hrrResultValue.textContent = heartRateReserve;
lowerZoneResultValue.textContent = lowerTargetHR;
upperZoneResultValue.textContent = upperTargetHR;
// Update table rows
restRateRow.textContent = restingHeartRate + " bpm";
moderateZoneRow.textContent = lowerTargetHR + " – " + Math.round((heartRateReserve * 0.70) + restingHeartRate) + " bpm";
vigorousZoneRow.textContent = Math.round((heartRateReserve * 0.70) + restingHeartRate) + " – " + upperTargetHR + " bpm";
maxEffortRow.textContent = (upperTargetHR + 1) + " – " + maxHeartRate + " bpm";
updateChart(maxHeartRate, restingHeartRate, lowerTargetHR, upperTargetHR, targetHeartRate);
}
function clearResults() {
primaryResultValue.textContent = "–";
mhrResultValue.textContent = "–";
hrrResultValue.textContent = "–";
lowerZoneResultValue.textContent = "–";
upperZoneResultValue.textContent = "–";
restRateRow.textContent = "–";
moderateZoneRow.textContent = "–";
vigorousZoneRow.textContent = "–";
maxEffortRow.textContent = "–";
if (heartRateChart) {
heartRateChart.destroy();
}
}
function resetCalculator() {
ageInput.value = "";
rhrInput.value = "";
intensitySelect.value = "moderate";
ageError.style.display = 'none';
rhrError.style.display = 'none';
clearResults();
}
function copyResults() {
var primary = document.querySelector('#primary-result .value').textContent;
var mhr = mhrResultValue.textContent;
var hrr = hrrResultValue.textContent;
var lowerZone = lowerZoneResultValue.textContent;
var upperZone = upperZoneResultValue.textContent;
var intensity = intensitySelect.options[intensitySelect.selectedIndex].text;
var assumptions = "Age: " + ageInput.value + " | RHR: " + rhrInput.value + " bpm";
var textToCopy = "Target Heart Rate Results:\n\n" +
"Primary Target Zone (" + intensity + "): " + primary + " bpm\n" +
"Estimated Max Heart Rate (MHR): " + mhr + " bpm\n" +
"Heart Rate Reserve (HRR): " + hrr + " bpm\n" +
"Lower Target Zone (50%): " + lowerZone + " bpm\n" +
"Upper Target Zone (85%): " + upperZone + " bpm\n\n" +
"Assumptions: " + assumptions;
navigator.clipboard.writeText(textToCopy).then(function() {
alert('Results copied to clipboard!');
}).catch(function(err) {
console.error('Failed to copy: ', err);
alert('Failed to copy results. Please copy manually.');
});
}
function initChart() {
chartContext = document.getElementById('heartRateChart').getContext('2d');
heartRateChart = new Chart(chartContext, {
type: 'bar', // Changed to bar for better visualization of zones
data: {
labels: ['Zones'],
datasets: [{
label: 'Max Heart Rate',
data: [0], // Placeholder
backgroundColor: 'rgba(255, 99, 132, 0.6)', // Reddish
borderColor: 'rgba(255, 99, 132, 1)',
borderWidth: 1
}, {
label: 'Target Zone',
data: [0], // Placeholder
backgroundColor: 'rgba(75, 192, 192, 0.6)', // Greenish
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}]
},
options: {
indexAxis: 'y', // Makes it horizontal bars
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
beginAtZero: true,
title: {
display: true,
text: 'Heart Rate (bpm)'
}
},
y: {
ticks: {
display: false // Hide y-axis labels for 'Zones'
}
}
},
plugins: {
legend: {
position: 'top',
},
title: {
display: true,
text: 'Heart Rate Zones for Weight Loss'
}
}
}
});
}
function updateChart(maxHR, rhr, lowerZone, upperZone, targetHR) {
if (!chartContext) {
initChart();
}
var moderateUpper = Math.round((maxHR – rhr) * 0.70 + rhr);
var vigorousUpper = upperZone; // Already calculated as 85%
// Update dataset values
heartRateChart.data.datasets[0].data = [maxHR]; // Max HR line
heartRateChart.data.datasets[1].data = [targetHR]; // Specific target HR line
// Add background color blocks for zones (using options)
heartRateChart.options.plugins.annotation = {
annotations: {
zone1: { // Resting Zone
type: 'box',
xMin: 0,
xMax: rhr,
yMin: '0',
yMax: '1',
backgroundColor: 'rgba(173, 216, 230, 0.3)' // Light blue
},
zone2: { // Moderate Zone
type: 'box',
xMin: rhr,
xMax: moderateUpper,
yMin: '0',
yMax: '1',
backgroundColor: 'rgba(144, 238, 144, 0.3)' // Light green
},
zone3: { // Vigorous Zone
type: 'box',
xMin: moderateUpper,
xMax: vigorousUpper,
yMin: '0',
yMax: '1',
backgroundColor: 'rgba(255, 160, 122, 0.3)' // Light salmon
},
zone4: { // Max Effort Zone
type: 'box',
xMin: vigorousUpper,
xMax: maxHR,
yMin: '0',
yMax: '1',
backgroundColor: 'rgba(255, 99, 132, 0.3)' // Light red
}
}
};
// Ensure annotation plugin is loaded if using Chart.js v3+
if (typeof ChartAnnotation !== 'undefined') {
Chart.register(ChartAnnotation);
} else {
console.warn("Chart.js Annotation plugin not found. Zones might not be visually represented.");
}
heartRateChart.update();
}
// Initial setup for chart
document.addEventListener('DOMContentLoaded', function() {
// Initialize chart on load, but it will be updated on calculation
initChart();
// Set initial placeholder values
clearResults();
});