Use .1 to .5 for balls. Input full quota (e.g., 20) if all out.
Bowling Performance (Conceded)
Use .1 to .5 for balls. Input full quota if opponent all out.
Your Net Run Rate
0.000
Runs Per Over For
0.00
Runs Per Over Against
0.00
function calculateNetRunRate() {
// 1. Get Input Values
var runsScoredInput = document.getElementById('totalRunsScored').value;
var oversFacedInput = document.getElementById('totalOversFaced').value;
var runsConcededInput = document.getElementById('totalRunsConceded').value;
var oversBowledInput = document.getElementById('totalOversBowled').value;
// 2. Validation
if (runsScoredInput === "" || oversFacedInput === "" || runsConcededInput === "" || oversBowledInput === "") {
alert("Please enter all fields to calculate the Net Run Rate.");
return;
}
var runsScored = parseFloat(runsScoredInput);
var oversFacedRaw = parseFloat(oversFacedInput);
var runsConceded = parseFloat(runsConcededInput);
var oversBowledRaw = parseFloat(oversBowledInput);
// 3. Helper Function to Convert Cricket Overs (e.g. 19.4) to Decimal (19.666)
function convertToActualOvers(oversVal) {
var oversInteger = Math.floor(oversVal);
// Handle floating point precision issues by rounding the decimal part
var balls = Math.round((oversVal – oversInteger) * 10);
// Validation: Cricket only has 6 balls per over
if (balls >= 6) {
// Treat as error or auto-correct (e.g., 0.6 = 1 over), but for NRR inputs, users usually type correctly.
// We will proceed with the calculation assuming standard notation.
}
return oversInteger + (balls / 6);
}
var actualOversFaced = convertToActualOvers(oversFacedRaw);
var actualOversBowled = convertToActualOvers(oversBowledRaw);
// Prevent division by zero
if (actualOversFaced === 0 || actualOversBowled === 0) {
alert("Total Overs cannot be zero.");
return;
}
// 4. Calculate Rates
var runRateFor = runsScored / actualOversFaced;
var runRateAgainst = runsConceded / actualOversBowled;
var netRunRate = runRateFor – runRateAgainst;
// 5. Display Results
var resultBox = document.getElementById('nrrResult');
var nrrValueDisplay = document.getElementById('nrrValue');
var rpoForDisplay = document.getElementById('rpoFor');
var rpoAgainstDisplay = document.getElementById('rpoAgainst');
// Formatting NRR (usually +0.123 or -0.456)
var formattedNRR = netRunRate.toFixed(3);
if (netRunRate > 0) {
formattedNRR = "+" + formattedNRR;
nrrValueDisplay.className = "nrr-result-value positive-nrr";
} else if (netRunRate < 0) {
nrrValueDisplay.className = "nrr-result-value negative-nrr";
} else {
nrrValueDisplay.className = "nrr-result-value";
}
nrrValueDisplay.innerText = formattedNRR;
rpoForDisplay.innerText = runRateFor.toFixed(2);
rpoAgainstDisplay.innerText = runRateAgainst.toFixed(2);
resultBox.style.display = "block";
}
What is Net Run Rate (NRR) in Cricket?
Net Run Rate (NRR) is the primary method used in cricket tournaments to rank teams with equal points. It serves as a tie-breaker in leagues such as the IPL, ICC World Cups, and the Big Bash League. Effectively, it measures a team's winning margin or losing margin relative to the overs played.
Unlike a simple average, NRR accounts for how quickly a team scores runs compared to how strictly they restrict their opponents.
Run Rate For: The average runs your team scores per over across the tournament.
Run Rate Against: The average runs your opponents score against you per over.
Subtracting the "Rate Against" from the "Rate For" gives you the Net Run Rate.
Important Calculation Rules
When using this calculator, it is crucial to understand two specific rules mandated by the ICC:
The "All Out" Rule: If a team is bowled out (loses all wickets) before their full quota of overs is completed, the calculation considers the full quota of overs, not the actual overs batted.
Example: If Team A is bowled out for 140 in 18.2 overs in a T20 match, the NRR calculation uses 140 / 20.0, not 140 / 18.33.
Abandoned Matches: Matches that are abandoned without a result (due to rain, etc.) are generally excluded from NRR calculations entirely.
Understanding the Results
Net Run Rate can be positive or negative:
Positive NRR: Indicates that a team scores runs faster than they concede them. This is typical for teams near the top of the table.
Negative NRR: Indicates that a team concedes runs faster than they score them.
Example Scenario
Imagine Team X plays one match in a tournament:
Team X scores 180 runs in 20 overs.
Team X restricts the opponent to 150 runs in 20 overs.
Calculation:
Scoring Rate: 180 / 20 = 9.00
Conceding Rate: 150 / 20 = 7.50
NRR: 9.00 – 7.50 = +1.500
Why is NRR Critical in Tournaments?
In tightly contested leagues like the T20 World Cup or IPL, multiple teams often finish with the same number of wins (points). The team with the higher NRR advances to the playoffs or semi-finals. This encourages teams not just to win, but to win by a large margin (scoring quickly or bowling opponents out cheaply) and, conversely, to narrow the margin of defeat if a loss is inevitable.