Heart Rate Calculator Ruler

ECG Heart Rate Ruler Calculator

This tool simulates an ECG (EKG) ruler to calculate the heart rate based on the distance between consecutive R-waves (the R-R interval) on a standard electrocardiogram strip.

Distance between two R peaks (1 small square = 1mm)
25 mm/s (Standard) 50 mm/s Standard ECG speed is 25mm/sec
Calculated Heart Rate
0 BPM
Normal

How the Heart Rate Ruler Logic Works

In clinical practice, a heart rate ruler (or EKG ruler) provides a quick way for medical professionals to determine the Heart Rate (BPM) from an ECG trace. This calculator replicates that physical tool using standard physiological constants.

The Formula

Heart Rate (BPM) = (Paper Speed in mm/sec × 60) / Distance in mm

On a standard ECG strip running at 25 mm/s:

  • 1 small square = 1 mm (0.04 seconds)
  • 1 large square = 5 mm (0.20 seconds)
  • Formula becomes: 1500 / number of small squares

Example Calculations

Distance (mm/Small Squares) Calculation (at 25mm/s) Heart Rate (BPM)
15 mm (3 large squares) 1500 / 15 100 BPM
20 mm (4 large squares) 1500 / 20 75 BPM
25 mm (5 large squares) 1500 / 25 60 BPM

Understanding the Results

The ruler categorization typically follows these general adult guidelines:

  • Bradycardia: Less than 60 BPM (Slow heart rate)
  • Normal Sinus Rhythm: 60 – 100 BPM
  • Tachycardia: Greater than 100 BPM (Fast heart rate)

Disclaimer: This calculator is for educational purposes only and should not be used for clinical diagnosis. Always consult a medical professional for ECG interpretation.

function calculateHeartRate() { var distance = parseFloat(document.getElementById("intervalDistance").value); var speed = parseFloat(document.getElementById("paperSpeed").value); var resultDiv = document.getElementById("hrResultBox"); var valueDisplay = document.getElementById("heartRateValue"); var categoryDisplay = document.getElementById("hrCategory"); if (isNaN(distance) || distance <= 0) { alert("Please enter a valid distance between R-waves (number of mm or small squares)."); return; } // Logic: BPM = (seconds per minute / seconds per mm) / distance in mm // Seconds per mm = 1 / speed // BPM = (60 * speed) / distance var bpm = (60 * speed) / distance; var roundedBpm = Math.round(bpm); valueDisplay.innerHTML = roundedBpm + " BPM"; resultDiv.style.display = "block"; var category = ""; var color = ""; if (roundedBpm = 60 && roundedBpm <= 100) { category = "Normal Sinus Rhythm"; color = "#2e7d32"; } else { category = "Tachycardia (Fast)"; color = "#d32f2f"; } categoryDisplay.innerText = category; categoryDisplay.style.color = color; valueDisplay.style.color = color; }

Leave a Comment