Net Run Rate Calculator with Wickets

Net Run Rate (NRR) Calculator with Wickets body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: #333; margin: 0; padding: 20px; background-color: #f4f7f6; } .calculator-container { max-width: 800px; margin: 0 auto; background: #ffffff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); } .calc-header { text-align: center; margin-bottom: 30px; border-bottom: 2px solid #2ecc71; padding-bottom: 15px; } .calc-header h1 { margin: 0; color: #2c3e50; } .input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; } @media (max-width: 700px) { .input-grid { grid-template-columns: 1fr; } } .team-section { background: #f9fff9; padding: 20px; border-radius: 8px; border: 1px solid #e0e0e0; } .opponent-section { background: #fff9f9; padding: 20px; border-radius: 8px; border: 1px solid #e0e0e0; } .section-title { font-weight: bold; color: #555; margin-bottom: 15px; text-transform: uppercase; font-size: 0.9em; letter-spacing: 1px; } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9em; } .form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box; } .form-group .hint { font-size: 0.8em; color: #777; margin-top: 3px; } .calculate-btn { display: block; width: 100%; background-color: #2ecc71; color: white; border: none; padding: 15px; font-size: 18px; font-weight: bold; border-radius: 6px; cursor: pointer; transition: background 0.3s; } .calculate-btn:hover { background-color: #27ae60; } .results-box { margin-top: 30px; background: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border: 1px solid #eee; } .nrr-display { font-size: 3em; font-weight: 800; margin: 10px 0; } .positive-nrr { color: #2ecc71; } .negative-nrr { color: #e74c3c; } .breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; border-top: 1px solid #ddd; padding-top: 15px; } .stat-item span { display: block; font-weight: bold; font-size: 1.2em; } .article-content { max-width: 800px; margin: 40px auto; padding: 20px; background: #fff; border-radius: 8px; } .article-content h2 { color: #2c3e50; margin-top: 30px; } .article-content p { color: #555; } .article-content ul { margin-bottom: 20px; } .article-content li { margin-bottom: 8px; }

Net Run Rate (NRR) Calculator

T20 (20 Overs) ODI (50 Overs) The Hundred (100 Balls)
Your Team Scored
Use .1 to .5 for balls (e.g. 19.4 = 19 overs 4 balls)
0 1 2 3 4 5 6 7 8 9 10 (All Out)
If 10, full quota overs are used for NRR.
Opponent Scored (Against You)
Overs you bowled to the opponent
0 1 2 3 4 5 6 7 8 9 10 (All Out)
If 10, full quota overs are used for NRR.

Net Run Rate

0.000
Team Run Rate 0.00
Opponent Run Rate 0.00

How to Calculate Net Run Rate with Wickets

Net Run Rate (NRR) is the preferred method for breaking ties in cricket tournaments like the IPL, Cricket World Cup, and T20 leagues. While the concept seems simple—runs scored minus runs conceded—the inclusion of wickets significantly alters the calculation through the "All Out" rule.

The "All Out" Rule in NRR

The most critical aspect of the NRR calculation involves wickets. Specifically, if a team is bowled out (loses all 10 wickets) before completing their full quota of overs (e.g., 20 overs in T20 or 50 in ODIs), the calculation penalizes them.

  • Standard Scenario: If a team scores 150/5 in 20 overs, their Run Rate is 150 ÷ 20 = 7.50.
  • All Out Scenario: If a team is bowled out for 150 in 18.2 overs, their Run Rate is NOT calculated based on 18.2 overs. Instead, the calculation assumes they faced the full quota (20 overs). Run Rate = 150 ÷ 20 = 7.50.

This rule prevents teams from artificially boosting their run rate by getting bowled out quickly while trying to slog. The Net Run Rate Calculator above automatically applies this rule when you select "10 (All Out)" in the Wickets dropdown.

The NRR Formula

The formula consists of two parts:

  1. Team Run Rate (TRR): Total Runs Scored ÷ Total Overs Faced (adjusted for All Out rule).
  2. Opponent Run Rate (ORR): Total Runs Conceded ÷ Total Overs Bowled (adjusted for All Out rule).

Formula: NRR = TRR – ORR

Converting Balls to Decimals

Cricket notation uses ".1" through ".5" to represent balls, but mathematical calculations require valid decimals. A standard over has 6 balls.

  • 19.1 overs = 19 + 1/6 overs ≈ 19.166
  • 19.3 overs = 19 + 3/6 overs = 19.500
  • 10.6 overs is invalid (it becomes 11.0).

Why is my NRR Negative?

A negative Net Run Rate indicates that, on average, your opponent is scoring faster against you than you are scoring against them. To improve a negative NRR, a team must secure large victories (winning by a big margin of runs or chasing a target with many overs to spare).

function calculateNRR() { // 1. Get Input Values var runsScored = parseFloat(document.getElementById('runsScored').value); var oversFacedInput = document.getElementById('oversFaced').value; var wicketsLost = parseInt(document.getElementById('wicketsLost').value); var runsConceded = parseFloat(document.getElementById('runsConceded').value); var oversBowledInput = document.getElementById('oversBowled').value; var wicketsTaken = parseInt(document.getElementById('wicketsTaken').value); var matchFormat = parseInt(document.getElementById('matchFormat').value); // Validation if (isNaN(runsScored) || isNaN(runsConceded) || !oversFacedInput || !oversBowledInput) { alert("Please enter valid runs and overs for both team and opponent."); return; } // 2. Helper to convert Over.Ball (10.4) to Decimal (10.666) function getEffectiveOvers(oversInput, wicketsCount, maxOvers) { // Apply "All Out" Rule if (wicketsCount === 10) { return { val: maxOvers, text: "All Out (Adjusted to " + maxOvers + ")" }; } var str = oversInput.toString(); var parts = str.split('.'); var whole = parseInt(parts[0]); var balls = 0; if (parts.length > 1) { balls = parseInt(parts[1]); } // Correction for inputs like 10.6 (which is actually 11) or weird inputs if (balls >= 6) { whole += Math.floor(balls / 6); balls = balls % 6; } var decimalVal = whole + (balls / 6); return { val: decimalVal, text: "Actual: " + whole + "." + balls }; } // 3. Calculate Effective Overs var teamOversObj = getEffectiveOvers(oversFacedInput, wicketsLost, matchFormat); var oppOversObj = getEffectiveOvers(oversBowledInput, wicketsTaken, matchFormat); // Prevent division by zero if (teamOversObj.val === 0 || oppOversObj.val === 0) { alert("Overs cannot be zero."); return; } // 4. Calculate Rates var teamRunRate = runsScored / teamOversObj.val; var oppRunRate = runsConceded / oppOversObj.val; var netRunRate = teamRunRate – oppRunRate; // 5. Display Results var resultContainer = document.getElementById('resultContainer'); var nrrDisplay = document.getElementById('nrrResult'); var teamRRDisplay = document.getElementById('teamRR'); var oppRRDisplay = document.getElementById('oppRR'); var teamMath = document.getElementById('teamOversMath'); var oppMath = document.getElementById('oppOversMath'); resultContainer.style.display = 'block'; // Formatting NRR (standard is usually 3 decimals, sometimes with + sign) var sign = netRunRate > 0 ? "+" : ""; nrrDisplay.innerText = sign + netRunRate.toFixed(3); // Color coding nrrDisplay.className = 'nrr-display ' + (netRunRate >= 0 ? 'positive-nrr' : 'negative-nrr'); teamRRDisplay.innerText = teamRunRate.toFixed(2); oppRRDisplay.innerText = oppRunRate.toFixed(2); // Show logic used (Actual vs Adjusted) teamMath.innerText = "Runs: " + runsScored + " / Overs: " + teamOversObj.val.toFixed(2) + " (" + (wicketsLost === 10 ? "All Out Rule" : "Actual") + ")"; oppMath.innerText = "Runs: " + runsConceded + " / Overs: " + oppOversObj.val.toFixed(2) + " (" + (wicketsTaken === 10 ? "All Out Rule" : "Actual") + ")"; }

Leave a Comment