Calculate precise NRR for tournament standings (IPL, World Cup, Leagues)
Your Team's Performance
Use .1 to .5 for balls (e.g., 20.3 is 20 overs 3 balls)
Opponents' Performance
If opponent was all-out, enter full quota (e.g., 20 or 50)
Your Net Run Rate (NRR) is:
0.000
How to Calculate Net Run Rate (NRR) in Cricket
Net Run Rate (NRR) is the preferred method for breaking ties in multi-team cricket tournaments like the ICC World Cup, T20 World Cup, and league tournaments such as the IPL (Indian Premier League) or BBL. It serves as a statistical method to rank teams that finish with the same number of points.
Unlike a simple run average, the NRR calculates the difference between the rate at which a team scores runs and the rate at which they concede runs throughout a tournament.
The Net Run Rate Formula
The mathematical formula for calculating NRR is:
NRR = (Total Runs Scored ÷ Total Overs Faced) – (Total Runs Conceded ÷ Total Overs Bowled)
Where:
Total Runs Scored: The sum of all runs scored by the team in all matches.
Total Overs Faced: The sum of all overs batted. Note: Cricket overs (sets of 6 balls) must be converted mathematically. 10.3 overs is not 10.3 in math, but 10 + 3/6 overs.
Total Runs Conceded: The sum of all runs scored by the opponents against the team.
Total Overs Bowled: The sum of all overs bowled by the team.
Important Calculation Rules
When using this calculator or calculating manually, keep these crucial cricket rules in mind:
The "All Out" Rule: If a team is bowled out (loses all 10 wickets) before completing their full quota of overs (e.g., in 45 overs in a 50-over match), the calculation counts the overs faced as the full quota (50 overs), not the actual overs batted. This penalizes teams for getting all out.
Abandoned Matches: Matches that are abandoned without a result are usually excluded from NRR calculations entirely.
Duckworth-Lewis-Stern (DLS): In rain-affected matches settled by DLS, the runs scored and overs faced are adjusted to the par scores set by the DLS method.
Example Calculation
Imagine Team A plays 2 matches in a T20 tournament:
Match 1: Scored 180/4 in 20 overs. Conceded 160/8 in 20 overs.
Match 2: Scored 150/10 in 18 overs (All Out). Conceded 140/9 in 20 overs.
Step 1: Calculate Team Scoring Rate
Total Runs Scored = 180 + 150 = 330.
Total Overs Faced = 20 + 20 (Due to All Out rule in Match 2) = 40.
Run Rate For = 330 ÷ 40 = 8.25.
Step 2: Calculate Opponent Scoring Rate
Total Runs Conceded = 160 + 140 = 300.
Total Overs Bowled = 20 + 20 = 40.
Run Rate Against = 300 ÷ 40 = 7.50.
Step 3: Final NRR
NRR = 8.25 – 7.50 = +0.750
function calculateNRR() {
// 1. Get Input Values
var teamRuns = parseFloat(document.getElementById('teamRuns').value);
var teamOversInput = parseFloat(document.getElementById('teamOvers').value);
var oppRuns = parseFloat(document.getElementById('opponentRuns').value);
var oppOversInput = parseFloat(document.getElementById('opponentOvers').value);
// 2. Validation
if (isNaN(teamRuns) || isNaN(teamOversInput) || isNaN(oppRuns) || isNaN(oppOversInput)) {
alert("Please enter valid numbers for all fields.");
return;
}
if (teamOversInput <= 0 || oppOversInput 1) {
// If input is 10.4, split[1] is '4'. We parse that.
// However, standard math inputs might drop trailing zeros,
// but in cricket .1 to .5 are the only valid decimals.
balls = parseInt(split[1]);
// Handle cases like 10.10 (unlikely in cricket notation but possible user error)
// We assume single digit ball input usually. If user types 10.1, it's 1 ball.
// If strict math logic: 10.1 is 1/10th, but in cricket 10.1 means 10 overs 1 ball.
// We will perform logic based on the decimal digit value directly.
// Correction for standard float handling:
// 10.1 might come in as slightly different float, so we use the Math approach for robustness
var integerPart = Math.floor(oversVal);
var decimalPart = Math.round((oversVal – integerPart) * 10);
overs = integerPart;
balls = decimalPart;
}
// Basic validation for balls (cannot be > 5 in cricket notation usually)
if (balls >= 6) {
// If someone enters 10.6, it's effectively 11 overs, but let's just calculate it mathematically as balls
// Ideally prompt error, but we will process.
}
// Convert to true decimal (base 10)
// Formula: Full Overs + (Balls / 6)
return overs + (balls / 6);
}
// 4. Perform Conversion
var teamOversMath = convertOversToMath(teamOversInput);
var oppOversMath = convertOversToMath(oppOversInput);
// 5. Calculate Rates
var teamRunRate = teamRuns / teamOversMath;
var oppRunRate = oppRuns / oppOversMath;
// 6. Calculate NRR
var nrr = teamRunRate – oppRunRate;
// 7. formatting
var sign = (nrr > 0) ? "+" : "";
var finalNRR = sign + nrr.toFixed(3);
// 8. Display Results
var resultBox = document.getElementById('nrr-result-box');
var resultText = document.getElementById('nrrResult');
var breakdown = document.getElementById('nrrBreakdown');
resultBox.style.display = "block";
resultText.innerText = finalNRR;
// Dynamic coloring based on positive/negative result
if (nrr >= 0) {
resultText.style.color = "#007c41"; // Green
resultBox.style.borderColor = "#007c41";
resultBox.style.background = "#e8f5e9";
} else {
resultText.style.color = "#d32f2f"; // Red
resultBox.style.borderColor = "#d32f2f";
resultBox.style.background = "#ffebee";
}
breakdown.innerHTML =
"Analysis:" +
"Your Scoring Rate: " + teamRunRate.toFixed(3) + " runs/over" +
"Opponent Scoring Rate: " + oppRunRate.toFixed(3) + " runs/over" +
"Math used: " + teamRuns + "/" + teamOversMath.toFixed(4) + " – " + oppRuns + "/" + oppOversMath.toFixed(4) + "";
}