Total runs scored by your team across all matches.
Use decimal for balls (e.g. 50.4 is 50 overs, 4 balls).
Total runs scored by opponents against your team.
Total overs your team bowled against opponents.
function calculateNRR() {
// Retrieve inputs
var runsScored = parseFloat(document.getElementById('totalRunsScored').value);
var oversFacedInput = parseFloat(document.getElementById('totalOversFaced').value);
var runsConceded = parseFloat(document.getElementById('totalRunsConceded').value);
var oversBowledInput = parseFloat(document.getElementById('totalOversBowled').value);
var resultDiv = document.getElementById('result');
// Validation
if (isNaN(runsScored) || isNaN(oversFacedInput) || isNaN(runsConceded) || isNaN(oversBowledInput)) {
resultDiv.style.display = "block";
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
if (oversFacedInput === 0 || oversBowledInput === 0) {
resultDiv.style.display = "block";
resultDiv.innerHTML = "Overs cannot be zero.";
return;
}
// Helper function to convert Cricket Overs (e.g., 50.4) to Mathematical Overs (e.g., 50.666)
function convertToDecimalOvers(overs) {
var wholeOvers = Math.floor(overs);
// Floating point precision correction for getting the decimal part
var balls = Math.round((overs – wholeOvers) * 10);
// Validate ball input (can't have .6, .7 etc in cricket notation usually, but we handle rollover)
if (balls >= 6) {
// If user enters 10.6, it implies 11 overs.
// However, usually users type 10.4.
// We will treat .6 as 6 balls = 1 over for robustness
}
return wholeOvers + (balls / 6);
}
var realOversFaced = convertToDecimalOvers(oversFacedInput);
var realOversBowled = convertToDecimalOvers(oversBowledInput);
// Calculate Average Runs Per Over (Run Rate)
var teamRunRate = runsScored / realOversFaced;
var opponentRunRate = runsConceded / realOversBowled;
// Net Run Rate Formula
var nrr = teamRunRate – opponentRunRate;
// Formatting
var nrrFormatted = nrr.toFixed(3);
var sign = nrr > 0 ? "+" : "";
var color = nrr >= 0 ? "#2e7d32" : "#c62828";
// Display Result
resultDiv.style.display = "block";
resultDiv.innerHTML = `
Your Net Run Rate is:
${sign}${nrrFormatted}
Team Run Rate: ${teamRunRate.toFixed(3)} (Runs/Over)
Opponent Run Rate: ${opponentRunRate.toFixed(3)} (Runs/Over)
Formula: ${teamRunRate.toFixed(3)} – ${opponentRunRate.toFixed(3)} = ${nrrFormatted}
`;
}
How to Calculate Run Rate in Cricket for Points Table
In competitive cricket tournaments like the World Cup, IPL, or Big Bash League, the points table is the ultimate scoreboard. While points for wins differ, the Net Run Rate (NRR) is the crucial tie-breaker used to rank teams that finish with the same number of points. Understanding how to calculate run rate in cricket for the points table is essential for fans and analysts trying to predict which team will qualify for the playoffs.
What is Net Run Rate (NRR)?
Net Run Rate is not just the speed at which a team scores runs; it is a comparative metric. It represents the difference between a team's scoring rate and the rate at which they concede runs to opponents. A positive NRR means a team is scoring faster than their opponents are scoring against them, while a negative NRR indicates the opposite.
The NRR Formula
To calculate the Net Run Rate for the points table, the formula is applied to the aggregate stats of the entire tournament, not just a single match.
NRR = (Total Runs Scored / Total Overs Faced) – (Total Runs Conceded / Total Overs Bowled)
This formula consists of two parts:
Team's Run Rate (TRR): Total runs scored divided by total overs faced.
Opponent's Run Rate (ORR): Total runs conceded divided by total overs bowled.
Result: TRR minus ORR equals the NRR.
Important Calculation Rules
When using the calculator above, keep these cricket-specific rules in mind regarding the "Overs" input:
Decimal Overs: In cricket, overs are often written as 10.4 (10 overs and 4 balls). Mathematically, an over consists of 6 balls. Therefore, 4 balls is not 0.4, but 4/6 (approx 0.666). The calculator handles this conversion automatically.
All Out Scenarios: If a team is bowled out (all out) before their full quota of overs is played (e.g., they are all out in 35 overs in a 50-over match), the calculation assumes they faced the full quota of overs (50) for the purpose of NRR. This penalizes teams for getting all out.
Abandoned Matches: Matches that are abandoned without a result (due to rain) are generally excluded from NRR calculations in most tournaments.
Example Calculation
Let's say Team A has played two matches:
Match 1: Scored 300/6 in 50 overs. Opponent scored 250 all out.
Match 2: Scored 200 all out in 40 overs (Counted as 50 overs faced because they were all out). Opponent scored 201/2 in 30.5 overs.
Total Runs Scored: 300 + 200 = 500 Total Overs Faced: 50 + 50 (due to all out rule) = 100 Team Run Rate: 500 / 100 = 5.00
Total Runs Conceded: 250 + 201 = 451 Total Overs Bowled: 50 (Opponent all out) + 30.83 (30.5 overs) = 80.83 Opponent Run Rate: 451 / 80.83 ≈ 5.58
NRR: 5.00 – 5.58 = -0.58
Using this calculator allows you to input these aggregate totals quickly to see exactly where your favorite team stands on the leaderboard.