Calculate Current Run Rate (CRR), Required Run Rate (RRR), and Projected Scores.
Use decimal for balls (e.g. .1 to .5)
T20 (20 Overs)
ODI (50 Overs)
Test (90 Overs/Day)
The Hundred (100 Balls)
Current Run Rate (CRR)–
Projected Score–
Required Run Rate (RRR)–
Runs Needed–
Calculation Summary–
function calculateRunRate() {
// Clear previous errors
var errorDiv = document.getElementById('errorDisplay');
errorDiv.style.display = 'none';
errorDiv.innerHTML = ";
// Get Inputs
var runs = parseFloat(document.getElementById('runsScored').value);
var oversInput = parseFloat(document.getElementById('oversBowled').value);
var totalMatchOvers = parseInt(document.getElementById('totalMatchOvers').value);
var target = parseFloat(document.getElementById('targetScore').value);
// Validation
if (isNaN(runs) || runs < 0) {
errorDiv.innerHTML = "Please enter valid Runs Scored.";
errorDiv.style.display = 'block';
return;
}
if (isNaN(oversInput) || oversInput = 6) {
errorDiv.innerHTML = "Invalid Overs input. Balls fraction cannot exceed .5 (e.g., 10.5 is max, 10.6 becomes 11.0).";
errorDiv.style.display = 'block';
return;
}
// Convert cricket notation to mathematical overs
// Example: 10.3 overs = 10 + 3/6 = 10.5 mathematical overs
var totalBallsBowled = (completedOvers * 6) + ballsBowledInCurrentOver;
var mathematicalOvers = totalBallsBowled / 6;
if (mathematicalOvers === 0 && runs > 0) {
// Avoid division by zero, though unlikely in valid cricket unless wides hit before legal ball
mathematicalOvers = 0.001;
}
if (mathematicalOvers > totalMatchOvers) {
errorDiv.innerHTML = "Overs bowled cannot exceed Total Match Overs.";
errorDiv.style.display = 'block';
return;
}
// 1. Calculate CRR
var crr = 0;
if (mathematicalOvers > 0) {
crr = runs / mathematicalOvers;
}
// 2. Calculate Projected Score
var projected = crr * totalMatchOvers;
// Display Base Results
document.getElementById('resCRR').innerText = crr.toFixed(2);
document.getElementById('resProjected').innerText = Math.round(projected);
document.getElementById('resultDisplay').style.display = 'block';
// 3. Handle Target/Chasing Logic
var chasingMode = false;
if (!isNaN(target) && target > 0) {
chasingMode = true;
document.getElementById('chasingBox1').style.display = 'block';
document.getElementById('chasingBox2').style.display = 'block';
var runsNeeded = target – runs;
var ballsRemaining = (totalMatchOvers * 6) – totalBallsBowled;
var oversRemaining = ballsRemaining / 6;
var rrr = 0;
if (runsNeeded <= 0) {
document.getElementById('resRRR').innerText = "Target Met";
document.getElementById('resNeeded').innerText = "0";
} else if (oversRemaining <= 0) {
document.getElementById('resRRR').innerText = "Impossible";
document.getElementById('resNeeded').innerText = runsNeeded;
} else {
rrr = runsNeeded / oversRemaining;
document.getElementById('resRRR').innerText = rrr.toFixed(2);
document.getElementById('resNeeded').innerText = runsNeeded;
}
} else {
document.getElementById('chasingBox1').style.display = 'none';
document.getElementById('chasingBox2').style.display = 'none';
}
// Summary Text
var summary = "";
if (chasingMode) {
summary = "To win, the batting team needs " + (target – runs) + " runs from " + ((totalMatchOvers * 6) – totalBallsBowled) + " balls. Current Rate: " + crr.toFixed(2) + " | Required Rate: " + (runsNeeded > 0 && oversRemaining > 0 ? (runsNeeded/oversRemaining).toFixed(2) : "-");
} else {
summary = "At the current rate of " + crr.toFixed(2) + " runs per over, the projected score after " + totalMatchOvers + " overs is " + Math.round(projected) + ".";
}
document.getElementById('resSummary').innerHTML = summary;
}
How Run Rate is Calculated in Cricket
Run Rate (RR) is one of the most fundamental statistics in limited-overs cricket (ODIs and T20s). It represents the average number of runs a batting team scores per over. Understanding how to calculate it is essential for players, coaches, and fans alike to gauge the tempo of a match.
1. The Formula for Current Run Rate (CRR)
The Current Run Rate is a simple division of total runs scored by the total overs bowled. However, because cricket overs consist of 6 balls, the calculation requires converting the "Overs.Balls" notation into a mathematical fraction.
Formula:
CRR = Total Runs Scored ÷ Total Overs Bowled
The Tricky Part: Converting Overs
In cricket, overs are often displayed as 10.4 (10 overs and 4 balls). You cannot simply divide runs by 10.4 because the ".4" is not a decimal fraction of 10; it represents 4 out of 6 balls.
To calculate accurately:
Convert balls to a fraction: 1 ball = 1/6 (0.166), 3 balls = 3/6 (0.5), 4 balls = 4/6 (0.666).
Example: If score is 145 in 20.4 overs:
Real Overs = 20 + (4/6) = 20.666
CRR = 145 ÷ 20.666 = 7.01 runs per over.
2. Calculating Required Run Rate (RRR)
When a team is chasing a target, the Required Run Rate (RRR) tells them how fast they need to score to win. This number fluctuates after every ball.
Formula:
RRR = (Runs Needed to Win) ÷ (Overs Remaining)
Example Scenario:
Target is 200. Current score is 120 in 15 overs (in a T20 match).
Runs Needed = 200 – 120 = 80 runs.
Overs Remaining = 20 – 15 = 5 overs.
RRR = 80 ÷ 5 = 16.00 runs per over.
3. Understanding Net Run Rate (NRR)
While the calculator above focuses on match-time situations (CRR and RRR), you might also hear about Net Run Rate (NRR). This is used in tournament standings to rank teams with equal points.
NRR is calculated as:
NRR = (Average Runs Scored per Over by Team) – (Average Runs Scored per Over Against Team)
A positive NRR means a team scores faster than their opponents on average, while a negative NRR indicates they concede runs faster than they score them. This metric is crucial in the World Cup and IPL group stages.
Why is Run Rate Important?
In modern cricket, knowing the run rate helps captains decide strategy. If the CRR is high, the batting team might play conservatively to keep wickets in hand. If the RRR climbs too high (e.g., above 12 in T20s or 8 in ODIs), the batting team must take aggressive risks to hit boundaries.