Electrocardiogram (ECG) interpretation is a fundamental skill in clinical medicine. One of the first steps in analyzing a rhythm strip is determining the heart rate (ventricular rate). There are several mathematical methods used to calculate heart rate depending on whether the rhythm is regular or irregular.
The Sequence Method (Large Square Method)
This is the quickest way to estimate heart rate for regular rhythms. ECG paper is divided into large squares (5mm). At a standard speed of 25mm/s, one large square represents 0.2 seconds. The formula is:
Heart Rate = 300 / Number of Large Squares between R-waves
The Small Square Method
For greater precision in regular rhythms, clinicians count the small squares (1mm) between R-waves. Each small square represents 0.04 seconds. The formula is:
Heart Rate = 1500 / Number of Small Squares between R-waves
ECG Calculation Reference Table
Large Squares (R-R)
Small Squares (R-R)
Heart Rate (BPM)
1
5
300
2
10
150
3
15
100
4
20
75
5
25
60
6
30
50
How to Calculate for Irregular Rhythms
If the R-R interval varies significantly (e.g., Atrial Fibrillation), the square methods are inaccurate. In these cases, use the 6-second method:
Count the number of R-waves (QRS complexes) in a 6-second strip.
Multiply that number by 10 to get the beats per minute.
Clinical Heart Rate Categories
Normal: 60 – 100 BPM
Bradycardia: Less than 60 BPM
Tachycardia: Greater than 100 BPM
function calculateECGHeartRate() {
var speed = parseFloat(document.getElementById('paperSpeed').value);
var largeSq = parseFloat(document.getElementById('largeSquares').value);
var smallSq = parseFloat(document.getElementById('smallSquares').value);
var resultDiv = document.getElementById('ecgResultBox');
var hrOutput = document.getElementById('hrOutput');
var hrCategory = document.getElementById('hrCategory');
var calcMethod = document.getElementById('calcMethod');
var bpm = 0;
var methodUsed = "";
// Validation
if (isNaN(largeSq) && isNaN(smallSq)) {
alert("Please enter either Large Squares or Small Squares.");
return;
}
// Calculation Logic
// Adjusting constants based on paper speed
// Standard (25mm/s): Large = 300, Small = 1500
// Double (50mm/s): Large = 600, Small = 3000
var largeConstant = (speed / 25) * 300;
var smallConstant = (speed / 25) * 1500;
if (!isNaN(smallSq) && smallSq > 0) {
bpm = smallConstant / smallSq;
methodUsed = "Calculated using Small Square Method (" + smallConstant + " / " + smallSq + ")";
} else if (!isNaN(largeSq) && largeSq > 0) {
bpm = largeConstant / largeSq;
methodUsed = "Calculated using Large Square Method (" + largeConstant + " / " + largeSq + ")";
}
if (bpm > 0) {
var finalBpm = Math.round(bpm);
hrOutput.innerHTML = "Heart Rate: " + finalBpm + " BPM";
calcMethod.innerHTML = methodUsed + " at " + speed + " mm/s.";
var category = "";
var color = "";
if (finalBpm 100) {
category = "Tachycardia";
color = "#d32f2f";
} else {
category = "Normal Sinus Rhythm (Rate)";
color = "#2e7d32";
}
hrCategory.innerHTML = "Classification: " + category;
hrCategory.style.color = color;
resultDiv.style.display = "block";
} else {
alert("Please enter valid positive numbers.");
}
}