body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.calculator-container {
background: #fdfdfd;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 25px;
margin-bottom: 40px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.calc-title {
text-align: center;
color: #2c3e50;
margin-bottom: 25px;
border-bottom: 2px solid #27ae60;
padding-bottom: 10px;
}
.input-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
@media (max-width: 600px) {
.input-grid {
grid-template-columns: 1fr;
}
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #444;
}
.input-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.input-group .note {
font-size: 12px;
color: #666;
margin-top: 4px;
}
button.calc-btn {
display: block;
width: 100%;
padding: 15px;
background-color: #27ae60;
color: white;
border: none;
border-radius: 5px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
margin-top: 10px;
transition: background-color 0.3s;
}
button.calc-btn:hover {
background-color: #219150;
}
#nrrResult {
margin-top: 25px;
padding: 20px;
background-color: #f1f8e9;
border: 1px solid #c8e6c9;
border-radius: 5px;
text-align: center;
display: none;
}
.nrr-value {
font-size: 32px;
font-weight: bold;
color: #2e7d32;
}
.breakdown {
margin-top: 15px;
font-size: 14px;
text-align: left;
border-top: 1px solid #ddd;
padding-top: 10px;
}
.article-content {
background: #fff;
padding: 20px;
}
.article-content h2 {
color: #2c3e50;
margin-top: 30px;
}
.article-content h3 {
color: #34495e;
}
.formula-box {
background: #f8f9fa;
padding: 15px;
border-left: 4px solid #27ae60;
font-family: monospace;
margin: 15px 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #ddd;
padding: 10px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
function calculateCricketNRR() {
// Get Inputs
var runsScored = parseFloat(document.getElementById('runsScored').value);
var oversFacedStr = document.getElementById('oversFaced').value;
var runsConceded = parseFloat(document.getElementById('runsConceded').value);
var oversBowledStr = document.getElementById('oversBowled').value;
// Element to display result
var resultDiv = document.getElementById('nrrResult');
var valueDisplay = document.getElementById('nrrValueDisplay');
var breakdownDisplay = document.getElementById('nrrBreakdown');
// Validation
if (isNaN(runsScored) || runsScored < 0 ||
oversFacedStr === "" ||
isNaN(runsConceded) || runsConceded 5 in cricket notation unless it's a full over)
if (balls >= 6) {
// Adjust if user typed 10.6 (treat as 11.0) or handle as error?
// Standard logic: 10.6 isn't standard, but 6 balls = 1 over.
oversInt += Math.floor(balls / 6);
balls = balls % 6;
}
return oversInt + (balls / 6);
}
var realOversFaced = convertOversToDecimal(oversFacedStr);
var realOversBowled = convertOversToDecimal(oversBowledStr);
// Prevent division by zero
if (realOversFaced === 0 || realOversBowled === 0) {
alert("Overs cannot be zero.");
return;
}
// Calculate Run Rates
var runRateFor = runsScored / realOversFaced;
var runRateAgainst = runsConceded / realOversBowled;
// Calculate NRR
var nrr = runRateFor – runRateAgainst;
// Formatting
var sign = (nrr > 0) ? "+" : "";
var formattedNRR = sign + nrr.toFixed(3);
// Display
resultDiv.style.display = "block";
valueDisplay.innerHTML = formattedNRR;
valueDisplay.style.color = (nrr >= 0) ? "#2e7d32" : "#c62828";
breakdownDisplay.innerHTML =
"
" +
"Run Rate For: " + runsScored + " / " + realOversFaced.toFixed(4) + " =
" +
"Run Rate Against: " + runsConceded + " / " + realOversBowled.toFixed(4) + " =
" +
"NRR = " + runRateFor.toFixed(3) + " – " + runRateAgainst.toFixed(3) + " = " + formattedNRR;
}
Understanding the Cricket Net Run Rate Calculation Formula
Net Run Rate (NRR) is the preferred method for breaking ties in multi-team cricket tournaments, such as the ICC World Cup, T20 World Cup, and league tournaments like 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 simple run averages, the NRR calculation takes into account both batting and bowling performance relative to the number of overs played. This calculator allows you to input cumulative tournament statistics to determine the exact NRR.
The Net Run Rate Formula
The calculation involves two primary components: your team's scoring rate and the rate at which your team concedes runs.
NRR = (Runs Scored / Overs Faced) – (Runs Conceded / Overs Bowled)
Where:
- Runs Scored / Overs Faced: This is the Average Runs per Over (RPO) scored by the team (batting performance).
- Runs Conceded / Overs Bowled: This is the Average Runs per Over (RPO) scored against the team (bowling performance).
How to Handle Overs (The .1 to .5 nuance)
In cricket, overs are often written as decimals where the decimal represents the ball count (e.g., 10.3 means 10 overs and 3 balls). However, for the mathematical formula, these must be converted into true fractions because an over consists of 6 balls.
- 10.1 overs = 10 + 1/6 overs ≈ 10.166
- 10.3 overs = 10 + 3/6 overs = 10.500
- 10.5 overs = 10 + 5/6 overs ≈ 10.833
Our calculator automatically handles this conversion for you. You can simply input "10.4" for 10 overs and 4 balls.
Critical Rules: The "All Out" Scenario
There is a specific rule in NRR calculation regarding teams that are bowled out (all out) before their full quota of overs is completed.
If a team is bowled out: The calculation does NOT use the actual overs faced. Instead, it uses the full quota of overs applicable to that innings (e.g., 20 overs for T20, 50 overs for ODI).
Example: In a T20 match, if Team A is all out for 140 in 18.2 overs, the NRR calculation divides 140 by 20.0 (the full quota), not 18.33.
Note: If you are using this calculator and a team was bowled out, please enter the full quota of overs (e.g., 20 or 50) in the input field to ensure accuracy.
Example Calculation
Let's calculate the NRR for a team after two matches.
| Match |
Batting (Runs/Overs) |
Bowling (Runs/Overs) |
| Match 1 |
180 / 20.0 |
160 / 20.0 |
| Match 2 |
150 / 18.0 (Target reached) |
140 / 20.0 |
| Total |
330 Runs / 38.0 Overs |
300 Runs / 40.0 Overs |
Step 1: Calculate Batting Run Rate
Total Runs Scored: 330
Total Overs Faced: 38
Rate = 330 / 38 = 8.684
Step 2: Calculate Bowling Run Rate
Total Runs Conceded: 300
Total Overs Bowled: 40
Rate = 300 / 40 = 7.500
Step 3: Final NRR
NRR = 8.684 – 7.500 = +1.184
Why is NRR important?
In highly competitive tournaments like the IPL, multiple teams often finish with the same number of wins. A superior Net Run Rate acts as the tie-breaker, determining who qualifies for the playoffs or semi-finals. Teams often play aggressively even when victory is assured to boost their NRR.