Net Run Rate Calculation Cricket

Net Run Rate (NRR) Calculator for Cricket 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; background-color: #f4f7f6; } .calculator-container { background: #ffffff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 40px; border: 1px solid #e1e4e8; } h1 { text-align: center; color: #1a73e8; margin-bottom: 30px; } .input-group { margin-bottom: 20px; } .row { display: flex; gap: 20px; flex-wrap: wrap; } .col { flex: 1; min-width: 200px; } label { display: block; margin-bottom: 8px; font-weight: 600; color: #2c3e50; } input[type="number"] { width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box; transition: border-color 0.3s; } input[type="number"]:focus { border-color: #1a73e8; outline: none; } .helper-text { font-size: 12px; color: #666; margin-top: 4px; } button { display: block; width: 100%; padding: 15px; background-color: #1a73e8; color: white; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; margin-top: 20px; } button:hover { background-color: #1557b0; } #nrrResult { margin-top: 25px; padding: 20px; border-radius: 8px; text-align: center; display: none; } .result-positive { background-color: #e6fffa; border: 2px solid #38b2ac; color: #234e52; } .result-negative { background-color: #fff5f5; border: 2px solid #fc8181; color: #742a2a; } .result-value { font-size: 36px; font-weight: bold; margin: 10px 0; } .result-breakdown { font-size: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.1); } .article-content { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); } .article-content h2 { color: #2c3e50; border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; margin-top: 30px; } .article-content h3 { color: #34495e; margin-top: 25px; } .article-content ul { padding-left: 20px; } .article-content li { margin-bottom: 10px; } .formula-box { background: #f8f9fa; padding: 15px; border-left: 4px solid #1a73e8; font-family: monospace; margin: 15px 0; }

Net Run Rate (NRR) Calculator

Team Batting Stats

Use dot for balls (e.g., 10.4 is 10 overs 4 balls). If All-Out, enter full quota.

Team Bowling Stats

Use dot for balls (e.g., 20.2 is 20 overs 2 balls).
Team Net Run Rate
0.000

Understanding Net Run Rate in Cricket

Net Run Rate (NRR) is the preferred method for breaking ties in multi-team cricket tournaments, such as the ICC World Cup, IPL (Indian Premier League), and various T20 leagues. It essentially measures a team's winning margin or losing margin relative to the number of overs played.

How NRR is Calculated

The calculation involves comparing the rate at which a team scores runs against the rate at which they concede runs. It is not an average; it is a rate.

NRR = (Runs Scored / Overs Faced) – (Runs Conceded / Overs Bowled)

Simply put: Team Run Rate – Opponent Run Rate = Net Run Rate

Critical Rules for Calculation

  • Decimal Overs: In cricket, overs are often written as 10.4 (10 overs and 4 balls). For mathematical NRR calculations, this must be converted. Since an over has 6 balls, 10.4 overs equals 10 + 4/6 = 10.666 overs.
  • All Out Rule: If a team is bowled out (all out) before completing their full quota of overs (e.g., 50 in ODIs or 20 in T20s), the "Overs Faced" value used in the calculation is the full quota, not the actual overs played. This penalizes the team for losing all wickets.
  • Duckworth-Lewis-Stern (DLS): In rain-affected matches, the runs conceded and overs bowled may be adjusted according to the revised targets set by the DLS method.

Example Scenario

Imagine Team A plays 2 matches in a tournament:

  • Match 1: Scored 180/4 in 20 overs. Conceded 160/8 in 20 overs.
  • Match 2: Scored 150/10 (All Out) in 18.2 overs. Conceded 151/2 in 19 overs.

Total Runs Scored: 180 + 150 = 330
Total Overs Faced: 20 + 20 (Due to All Out rule) = 40

Total Runs Conceded: 160 + 151 = 311
Total Overs Bowled: 20 + 19 = 39

Using the calculator above, you can determine how these figures translate into a specific NRR value to determine league standings.

function calculateNRR() { // Get input values var runsScored = parseFloat(document.getElementById('runsScored').value); var oversFacedInput = parseFloat(document.getElementById('oversFaced').value); var runsConceded = parseFloat(document.getElementById('runsConceded').value); var oversBowledInput = parseFloat(document.getElementById('oversBowled').value); var resultDiv = document.getElementById('nrrResult'); var finalNRRDiv = document.getElementById('finalNRR'); var breakdownDiv = document.getElementById('breakdownText'); // Validation if (isNaN(runsScored) || isNaN(oversFacedInput) || isNaN(runsConceded) || isNaN(oversBowledInput)) { alert("Please enter valid numbers for all fields."); resultDiv.style.display = 'none'; return; } if (oversFacedInput === 0 || oversBowledInput === 0) { alert("Overs cannot be zero."); return; } // Helper function to convert cricket overs (e.g., 10.4) to mathematical overs (e.g., 10.666) function convertToMathOvers(cricketOvers) { var overs = Math.floor(cricketOvers); // Floating point precision fix: (10.4 – 10) can result in 0.40000000003 // Multiply by 10 and round to get the ball count var balls = Math.round((cricketOvers – overs) * 10); if (balls >= 6) { // This handles invalid input like 10.6 (which doesn't exist technically) // But we treat it as valid math input if user messed up return overs + (balls / 6); } return overs + (balls / 6); } var mathOversFaced = convertToMathOvers(oversFacedInput); var mathOversBowled = convertToMathOvers(oversBowledInput); // Calculate Run Rates var battingRunRate = runsScored / mathOversFaced; var bowlingRunRate = runsConceded / mathOversBowled; // Calculate NRR var nrr = battingRunRate – bowlingRunRate; // Display results var nrrFormatted = (nrr > 0 ? "+" : "") + nrr.toFixed(3); finalNRRDiv.innerHTML = nrrFormatted; // Dynamic breakdown text breakdownDiv.innerHTML = "Batting Run Rate: " + runsScored + " / " + mathOversFaced.toFixed(2) + " = " + battingRunRate.toFixed(3) + "" + "Bowling Run Rate: " + runsConceded + " / " + mathOversBowled.toFixed(2) + " = " + bowlingRunRate.toFixed(3) + ""; // Styling based on positive/negative result resultDiv.className = nrr >= 0 ? "result-positive" : "result-negative"; resultDiv.style.display = 'block'; }

Leave a Comment