Run Rate Calculator for Cricket

Cricket Run Rate Calculator 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: 600px; margin: 0 auto; background: #ffffff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-top: 5px solid #2e7d32; } .calculator-title { text-align: center; color: #1a1a1a; margin-bottom: 25px; font-size: 24px; font-weight: 700; } .input-group { margin-bottom: 20px; } .input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; } .input-group input, .input-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box; transition: border-color 0.3s; } .input-group input:focus { border-color: #2e7d32; outline: none; box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1); } .calc-btn { width: 100%; background-color: #2e7d32; color: white; padding: 14px; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .calc-btn:hover { background-color: #1b5e20; } .results-box { margin-top: 25px; background-color: #e8f5e9; padding: 20px; border-radius: 8px; display: none; border-left: 5px solid #2e7d32; } .result-item { display: flex; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #c8e6c9; } .result-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .result-label { color: #555; font-weight: 500; } .result-value { color: #2e7d32; font-weight: 800; font-size: 18px; } .highlight-result { background: #fff; padding: 10px; border-radius: 4px; margin-top: 5px; } .note { font-size: 12px; color: #666; margin-top: 5px; font-style: italic; } .article-section { max-width: 800px; margin: 40px auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); } .article-section h2 { color: #2e7d32; margin-top: 0; } .article-section h3 { color: #333; margin-top: 25px; } .article-section p { margin-bottom: 15px; color: #555; } .formula-box { background: #f8f9fa; padding: 15px; border-left: 4px solid #666; font-family: monospace; margin: 15px 0; }
Cricket Run Rate Calculator
Use decimal for balls (e.g., 10.2 means 10 overs and 2 balls). Max decimal is .5
T20 (20 Overs) ODI (50 Overs) Test (90 per day) T10 (10 Overs) The Hundred (100 Balls)
Current Run Rate (CRR): 0.00
Projected Score (at CRR): 0
Required Run Rate (RRR): 0.00
Runs Needed: 0
Balls Remaining: 0

Understanding Cricket Run Rates

Run Rate is one of the most critical statistics in limited-overs cricket, such as One Day Internationals (ODIs) and T20s. It determines the pace at which a batting team is scoring runs and provides a benchmark for the chasing team to win the match.

Current Run Rate (CRR)

The Current Run Rate represents the average number of runs a team scores per over. It is calculated by dividing the total runs scored by the number of overs bowled.

CRR = Total Runs Scored / Overs Bowled

Note on Overs: In cricket calculations, overs are often expressed as decimals (e.g., 10.3 overs). However, mathematically, 10.3 overs means 10 full overs and 3 balls. Since an over has 6 balls, this is actually 10.5 overs in decimal math. Our calculator automatically handles this conversion to ensure accuracy.

Required Run Rate (RRR)

When a team is batting second (chasing a target), the Required Run Rate becomes the most important metric. It indicates how many runs per over the team must score for the remainder of the innings to win.

RRR = (Target Score – Current Score) / Overs Remaining

Strategic Importance

Captains and coaches use these metrics to pace an innings:

  • Consolidation Phase: Teams may accept a lower CRR to preserve wickets early in the innings.
  • Acceleration Phase: In the "death overs" (final 5-10 overs), teams aim to push the CRR significantly higher than the average.
  • DLS Method: In rain-affected matches, run rates are crucial for adjusting targets via the Duckworth-Lewis-Stern method.

Example Scenario

Imagine Team A scores 300 runs in 50 overs. Team B is chasing and is currently at 150 runs after 30.2 overs.

  • Overs Bowled: 30 overs + 2 balls = 30.333 mathematical overs.
  • CRR: 150 / 30.333 = 4.94 runs per over.
  • Runs Needed: 301 (Target) – 150 = 151 runs.
  • Overs Remaining: 50 – 30.333 = 19.667 overs (118 balls).
  • RRR: 151 / 19.667 = 7.68 runs per over.
function calculateCricketRunRate() { // 1. Get Input Values var runs = document.getElementById('runsScored').value; var oversInput = document.getElementById('oversBowled').value; var target = document.getElementById('targetScore').value; var totalInningsOvers = parseFloat(document.getElementById('totalOvers').value); // 2. Validate Inputs if (runs === "" || oversInput === "") { alert("Please enter both Runs Scored and Overs Bowled."); return; } runs = parseFloat(runs); var oversRaw = parseFloat(oversInput); // 3. Handle Cricket Over Logic (Base 6 conversion) // Extract integer overs and balls var oversInt = Math.floor(oversRaw); // Fix floating point issues for balls (e.g., 15.3) var ballsDecimal = Math.round((oversRaw – oversInt) * 10); // Validation: Balls cannot be 6 or more in input (e.g. 15.6 is invalid input notation for cricket) if (ballsDecimal >= 6) { alert("Invalid Overs format. The decimal part represents balls and must be between 0 and 5."); return; } // Convert cricket notation to mathematical value // 1 ball = 1/6th of an over var actualOvers = oversInt + (ballsDecimal / 6); // Prevent division by zero if (actualOvers === 0) { alert("Overs bowled must be greater than 0."); return; } // 4. Calculate Current Run Rate (CRR) var crr = runs / actualOvers; // 5. Calculate Projected Score var projectedScore = Math.round(crr * totalInningsOvers); // 6. Display CRR and Projected document.getElementById('crrDisplay').innerHTML = crr.toFixed(2); document.getElementById('projectedScore').innerHTML = projectedScore; // 7. Calculate Required Run Rate (RRR) if target exists var chasingDiv = document.getElementById('chasingStats'); if (target !== "" && parseFloat(target) > 0) { var targetScore = parseFloat(target); var runsNeeded = targetScore – runs; // Calculate Remaining Overs // Total balls in innings var totalBallsInInnings = totalInningsOvers * 6; // Balls already bowled var ballsBowled = (oversInt * 6) + ballsDecimal; var ballsRemaining = totalBallsInInnings – ballsBowled; var oversRemainingMath = ballsRemaining / 6; if (ballsRemaining = targetScore) { document.getElementById('rrrDisplay').innerHTML = "Won"; document.getElementById('runsNeededDisplay').innerHTML = "0"; } else { document.getElementById('rrrDisplay').innerHTML = "Lost"; document.getElementById('runsNeededDisplay').innerHTML = runsNeeded; } } else { if (runs >= targetScore) { document.getElementById('rrrDisplay').innerHTML = "Target Met"; document.getElementById('runsNeededDisplay').innerHTML = "0"; } else { var rrr = runsNeeded / oversRemainingMath; // If runs needed is negative (already won), handle gracefully if (rrr 0 ? ballsRemaining : 0; chasingDiv.style.display = "block"; } else { chasingDiv.style.display = "none"; } // Show results container document.getElementById('resultOutput').style.display = "block"; }

Leave a Comment