.calculator-container {
max-width: 600px;
margin: 20px auto;
padding: 25px;
background-color: #f8f9fa;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.calculator-title {
text-align: center;
color: #2c3e50;
margin-bottom: 25px;
font-size: 24px;
border-bottom: 3px solid #e74c3c;
display: inline-block;
padding-bottom: 5px;
}
.input-group {
margin-bottom: 20px;
}
.input-group label {
display: block;
margin-bottom: 8px;
color: #34495e;
font-weight: 600;
}
.input-group input {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 6px;
font-size: 16px;
box-sizing: border-box;
transition: border-color 0.3s;
}
.input-group input:focus {
border-color: #3498db;
outline: none;
}
.calc-btn {
width: 100%;
padding: 14px;
background-color: #e74c3c;
color: white;
border: none;
border-radius: 6px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s;
}
.calc-btn:hover {
background-color: #c0392b;
}
.result-box {
margin-top: 25px;
padding: 20px;
background-color: #fff;
border-radius: 8px;
border-left: 5px solid #2ecc71;
display: none;
}
.result-value {
font-size: 32px;
color: #27ae60;
font-weight: bold;
text-align: center;
margin: 10px 0;
}
.result-label {
text-align: center;
color: #7f8c8d;
font-size: 14px;
text-transform: uppercase;
letter-spacing: 1px;
}
.analysis-text {
text-align: center;
margin-top: 10px;
font-style: italic;
color: #555;
}
.article-content {
max-width: 800px;
margin: 40px auto;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
}
.article-content h2 {
color: #2c3e50;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
margin-top: 30px;
}
.article-content h3 {
color: #e74c3c;
}
.article-content ul {
background: #f9f9f9;
padding: 20px 40px;
border-radius: 8px;
}
.formula-box {
background-color: #e8f6f3;
padding: 15px;
border-radius: 5px;
border: 1px solid #d0e9e4;
text-align: center;
font-weight: bold;
font-size: 1.1em;
margin: 20px 0;
}
function calculateBattingSR() {
var runsInput = document.getElementById('runsScored');
var ballsInput = document.getElementById('ballsFaced');
var resultBox = document.getElementById('resultOutput');
var srValueDisplay = document.getElementById('srValue');
var srAnalysisDisplay = document.getElementById('srAnalysis');
var runs = parseFloat(runsInput.value);
var balls = parseFloat(ballsInput.value);
// Validation
if (isNaN(runs) || runs < 0) {
alert("Please enter a valid number for Runs Scored.");
return;
}
if (isNaN(balls) || balls = 200) {
analysis = "Incredible! This is an elite T20 finishing performance.";
} else if (strikeRate >= 150) {
analysis = "Excellent. A highly aggressive batting display suitable for T20s.";
} else if (strikeRate >= 100) {
analysis = "Good. Run-a-ball scoring, solid for ODIs and building T20 innings.";
} else if (strikeRate >= 60) {
analysis = "Steady. Typical for Test cricket or rebuilding an ODI innings.";
} else {
analysis = "Defensive. Focusing on wicket preservation (Test Match style).";
}
srAnalysisDisplay.innerHTML = analysis;
resultBox.style.display = "block";
}
How to Calculate Strike Rate of a Batsman
In the sport of cricket, statistics play a vital role in analyzing a player's performance. While batting average measures consistency, the Batting Strike Rate (SR) measures scoring speed. It is one of the most critical metrics in limited-overs formats like T20 and ODI cricket.
Simply put, the strike rate tells you how many runs a batsman would score if they faced 100 balls at their current pace. A higher strike rate indicates aggressive scoring, while a lower strike rate suggests a more defensive approach.
The Formula
The calculation is straightforward. It is the ratio of runs scored to balls faced, multiplied by 100.
Strike Rate = (Total Runs Scored ÷ Total Balls Faced) × 100
Step-by-Step Calculation Guide
- Identify Runs Scored: Take the total number of runs the batsman has scored in the innings or career.
- Identify Balls Faced: Take the total number of legal deliveries the batsman has faced. Note that "wides" generally do not count as balls faced by the batsman, but "no-balls" do.
- Divide: Divide the runs by the balls faced.
- Multiply: Multiply the result by 100 to get the standardized strike rate.
Real-World Examples
Example 1: The T20 Finisher
Imagine a batsman comes in during the final overs of a T20 match. They score 45 runs and face only 22 balls.
- Runs: 45
- Balls: 22
- Calculation: (45 ÷ 22) = 2.0454…
- Strike Rate: 2.0454 × 100 = 204.54
This is an exceptional strike rate, indicating the batter is scoring more than 2 runs per ball.
Example 2: The Test Match Anchor
In a Test match, a batsman plays carefully to save the game. They score 80 runs off 180 balls.
- Runs: 80
- Balls: 180
- Calculation: (80 ÷ 180) = 0.4444…
- Strike Rate: 0.4444 × 100 = 44.44
While low for limited overs, this is often a perfectly acceptable strike rate in Test cricket where survival is key.
What is a "Good" Strike Rate?
Context is everything in cricket. A good strike rate depends entirely on the format of the game:
- Test Cricket: 40 to 60 is considered standard. 70+ is aggressive (e.g., "Bazball").
- ODI (One Day International): 80 to 90 is standard. 100+ is excellent.
- T20 Cricket: 120 to 130 is average. 150+ is considered elite for power hitters.
Frequently Asked Questions
Do Wides count in balls faced?
No. Wides are extras added to the team total but are not counted as a ball faced by the batsman.
Is Strike Rate more important than Average?
In T20 cricket, Strike Rate is often valued higher than Average. In Test cricket, Average is king. In ODIs, a balance of both is ideal.