.nrr-calculator-wrapper {
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nrr-header {
text-align: center;
margin-bottom: 30px;
background-color: #0a2540;
color: #fff;
padding: 20px;
border-radius: 8px 8px 0 0;
}
.nrr-header h2 {
margin: 0;
font-size: 24px;
}
.nrr-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-bottom: 20px;
}
.nrr-section {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.nrr-section h3 {
margin-top: 0;
color: #0a2540;
font-size: 18px;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
margin-bottom: 15px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #333;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.form-group .help-text {
font-size: 12px;
color: #666;
margin-top: 4px;
}
.calc-btn {
display: block;
width: 100%;
background-color: #3498db;
color: white;
border: none;
padding: 15px;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s;
margin-bottom: 20px;
}
.calc-btn:hover {
background-color: #2980b9;
}
.result-box {
background-color: #e8f6fd;
border: 2px solid #3498db;
padding: 20px;
text-align: center;
border-radius: 8px;
display: none;
}
.result-value {
font-size: 48px;
font-weight: bold;
color: #2c3e50;
margin: 10px 0;
}
.result-breakdown {
font-size: 14px;
color: #555;
margin-top: 10px;
text-align: left;
background: #fff;
padding: 10px;
border-radius: 4px;
}
.article-content {
margin-top: 50px;
line-height: 1.6;
color: #333;
}
.article-content h2 {
color: #0a2540;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
margin-top: 30px;
}
.article-content ul {
background: #f9f9f9;
padding: 20px 40px;
border-radius: 4px;
}
@media (max-width: 600px) {
.nrr-grid {
grid-template-columns: 1fr;
}
}
function calculateCricketNRR() {
// 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;
// Basic Validation
if (runsScoredInput === "" || oversFacedInput === "" || runsConcededInput === "" || oversBowledInput === "") {
alert("Please fill in all fields to calculate NRR.");
return;
}
var runsScored = parseFloat(runsScoredInput);
var runsConceded = parseFloat(runsConcededInput);
// Function to convert cricket overs string (10.4) to decimal overs (10.666)
function convertCricketOversToDecimal(oversStr) {
var str = oversStr.toString();
var parts = str.split('.');
var overs = parseInt(parts[0]);
var balls = 0;
if (parts.length > 1 && parts[1] !== "") {
balls = parseInt(parts[1]);
}
// Validation for balls > 6, though in rare cases calculators allow aggregation
if (balls >= 6) {
var extraOvers = Math.floor(balls / 6);
balls = balls % 6;
overs += extraOvers;
}
return overs + (balls / 6);
}
var oversFacedDecimal = convertCricketOversToDecimal(oversFacedInput);
var oversBowledDecimal = convertCricketOversToDecimal(oversBowledInput);
// Avoid division by zero
if (oversFacedDecimal === 0 || oversBowledDecimal === 0) {
alert("Overs cannot be zero.");
return;
}
// Calculate Rates
var runRateFor = runsScored / oversFacedDecimal;
var runRateAgainst = runsConceded / oversBowledDecimal;
var netRunRate = runRateFor – runRateAgainst;
// Display Logic
var resultContainer = document.getElementById('resultContainer');
var nrrOutput = document.getElementById('nrrOutput');
var nrrBreakdown = document.getElementById('nrrBreakdown');
var sign = netRunRate > 0 ? "+" : "";
nrrOutput.innerHTML = sign + netRunRate.toFixed(3);
// Color coding
if(netRunRate > 0) {
nrrOutput.style.color = "#27ae60"; // Green for positive
} else if (netRunRate < 0) {
nrrOutput.style.color = "#c0392b"; // Red for negative
} else {
nrrOutput.style.color = "#2c3e50";
}
// Breakdown text
var breakdownHtml = "
";
breakdownHtml += "Run Rate For: " + runsScored + " / " + oversFacedDecimal.toFixed(3) + " =
";
breakdownHtml += "Run Rate Against: " + runsConceded + " / " + oversBowledDecimal.toFixed(3) + " =
";
breakdownHtml += "NRR = " + runRateFor.toFixed(3) + " – " + runRateAgainst.toFixed(3) + " =
";
nrrBreakdown.innerHTML = breakdownHtml;
resultContainer.style.display = "block";
}
What is Net Run Rate (NRR)?
Net Run Rate (NRR) is the preferred statistical method used in cricket tournaments to rank teams with equal points. Whether it's the ICC World Cup, T20 World Cup, or league tournaments like the IPL and BBL, NRR serves as the tie-breaker to decide which teams proceed to the semi-finals or playoffs.
Conceptually, NRR represents the average margin of victory (or defeat) per over across a tournament. A positive NRR indicates that a team scores faster than their opponents on average, while a negative NRR implies they concede runs faster than they score them.
How to Calculate Net Run Rate
The mathematical formula for Net Run Rate is straightforward but involves converting cricket overs (which are base-6) into standard decimal numbers. The formula is:
NRR = (Total Runs Scored / Total Overs Faced) – (Total Runs Conceded / Total Overs Bowled)
The calculation consists of two parts:
- Run Rate For: The average runs your team scores per over.
- Run Rate Against: The average runs your opponents score against you per over.
Critical Rules for NRR Calculation
When using this Tournament Net Run Rate Calculator, keep the following cricket-specific rules in mind:
- The "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 calculation counts the full quota (50 overs) as the overs faced. However, if a team chases down a target, only the actual overs batted are counted.
- Abandoned Matches: Matches that are abandoned without a result usually do not count toward NRR calculations.
- Duckworth-Lewis-Stern (DLS): In rain-affected matches where targets are revised, NRR calculations can become complex. Usually, the runs scored and overs faced are adjusted based on the par scores.
Example Calculation
Imagine Team A has played 2 matches in a tournament:
- Match 1: Scored 180/4 in 20 overs. Conceded 160/8 in 20 overs.
- Match 2: Scored 150 all out in 18 overs (treated as 20 overs if they batted first and lost). Let's assume they batted first, scored 150/10 in 18 overs (calculation uses 20 overs due to all-out rule). Opponent chased it in 15 overs scoring 152/2.
Total Runs Scored: 180 + 150 = 330
Total Overs Faced: 20 + 20 (due to all out) = 40
Run Rate For: 330 / 40 = 8.25
Total Runs Conceded: 160 + 152 = 312
Total Overs Bowled: 20 + 15 = 35
Run Rate Against: 312 / 35 = 8.914
Final NRR: 8.25 – 8.914 = -0.664
Why Use Our NRR Calculator?
Calculating NRR manually is prone to errors, primarily due to the conversion of overs into decimals. For example, 10 overs and 4 balls is 10.4 in cricket notation, but mathematically it is 10.666. This tool automatically handles the base-6 conversion of cricket balls to ensure your tournament scenarios are accurate.