Use decimal for balls (e.g., 10.4 is 10 overs, 4 balls)
Opponent Stats (Against)
Use decimal for balls (e.g., 19.5 is 19 overs, 5 balls)
Your Net Run Rate is:
0.000
Understanding Net Run Rate (NRR) in Cricket
Net Run Rate (NRR) is the preferred statistical method used to rank teams with equal points in limited-overs cricket tournaments, such as the ICC World Cup, T20 World Cup, and league tournaments like the IPL or Big Bash. It essentially measures a team's winning margin relative to the opposition.
A positive NRR indicates that a team scores faster than its opponents on average, while a negative NRR suggests the team concedes runs faster than it scores them.
The NRR Formula
The Net Run Rate is calculated by subtracting the Run Rate Conceded (against the team) from the Run Rate Scored (by the team).
NRR = (Total Runs Scored ÷ Total Overs Faced) – (Total Runs Conceded ÷ Total Overs Bowled)
How to Calculate NRR Step-by-Step
Calculate Team's Run Rate: Divide total runs scored by total overs faced.
Calculate Opponent's Run Rate: Divide total runs conceded by total overs bowled.
Subtract: Minus the Opponent's rate from the Team's rate.
Critical Calculation Rules
Ball Conversion: Cricket overs are not standard decimals. An input of "10.3" means 10 overs and 3 balls. For mathematical calculation, 3 balls is half an over (3/6), so it becomes 10.5 mathematically. Our calculator handles this conversion automatically.
All Out Rule: If a team is bowled out before completing their full quota of overs (e.g., all out in 35 overs of a 50-over match), the "Overs Faced" value used for the calculation must be the full quota (50 overs), not the actual overs played.
Duckworth-Lewis-Stern (DLS): In matches affected by rain where targets are revised, only the runs and overs up to the point of interruption (or the revised target metrics) are typically considered, though rules vary by specific tournament regulations.
Example Scenario
Imagine Team A plays a T20 match:
Batting: Team A scores 180 runs in 20.0 overs.
Bowling: Team A restricts the opponent to 150 runs in 20.0 overs.
Calculation:
Rate For: 180 / 20 = 9.0
Rate Against: 150 / 20 = 7.5
NRR: 9.0 – 7.5 = +1.500
function calculateNRR() {
// 1. Get Input Values
var runsScoredInput = document.getElementById('runsScored').value;
var oversFacedInput = document.getElementById('oversFaced').value;
var runsConcededInput = document.getElementById('runsConceded').value;
var oversBowledInput = document.getElementById('oversBowled').value;
// 2. Validate Inputs
if (runsScoredInput === "" || oversFacedInput === "" || runsConcededInput === "" || oversBowledInput === "") {
alert("Please fill in all fields to calculate NRR.");
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., 10.4) to decimal overs (e.g., 10.66)
function convertCricketOversToDecimal(oversVal) {
// Split into integer overs and balls
var wholeOvers = Math.floor(oversVal);
// Handle floating point precision issues for the balls part
// (oversVal – wholeOvers) might be 0.30000000004. Multiply by 10 and round.
var balls = Math.round((oversVal – wholeOvers) * 10);
// Validation: balls cannot be 6 or more in cricket notation
if (balls >= 6) {
// In case user enters 10.6, treat as 11.0?
// Or purely mathematical approach: 6 balls = 1 over.
wholeOvers += Math.floor(balls / 6);
balls = balls % 6;
}
return wholeOvers + (balls / 6.0);
}
// 4. Convert Overs
var oversFacedDecimal = convertCricketOversToDecimal(oversFacedRaw);
var oversBowledDecimal = convertCricketOversToDecimal(oversBowledRaw);
// Prevent division by zero
if (oversFacedDecimal === 0 || oversBowledDecimal === 0) {
alert("Overs cannot be zero.");
return;
}
// 5. Calculate Run Rates
var runRateFor = runsScored / oversFacedDecimal;
var runRateAgainst = runsConceded / oversBowledDecimal;
// 6. Calculate Net Run Rate
var nrr = runRateFor – runRateAgainst;
// 7. Format Output
// Determine sign
var sign = (nrr > 0) ? "+" : "";
var formattedNRR = sign + nrr.toFixed(3);
// 8. Display Results
var resultContainer = document.getElementById('result-container');
var nrrOutput = document.getElementById('nrrOutput');
var breakdownOutput = document.getElementById('breakdownOutput');
nrrOutput.innerText = formattedNRR;
nrrOutput.style.color = (nrr >= 0) ? "#2e7d32" : "#c62828"; // Green for positive, Red for negative
breakdownOutput.innerHTML =
"Run Rate For: " + runRateFor.toFixed(3) +
" ( " + runsScored + " / " + oversFacedDecimal.toFixed(2) + " )" +
"Run Rate Against: " + runRateAgainst.toFixed(3) +
" ( " + runsConceded + " / " + oversBowledDecimal.toFixed(2) + " )";
resultContainer.style.display = "block";
}