Cricket divides runs by dismissals. Baseball and softball divide hits by at-bats. Pick your sport.
Calculator
Singles, doubles, triples, and home runs. Not a walk, and not reaching on an error.
Plate appearances minus walks, hit-by-pitches, and sacrifices.
“4 for 6”, “4-for-6”, or “4/6” all fill the two boxes above. A bare “4-6” is deliberately ignored — in cricket that reads as bowling figures.
Batting average
.667
4 ÷ 6
On-base percentage
.667
.000 above the average
Slugging
.667
4 total bases
OPS
1.334
on-base plus slugging
Plate appearances
6
0 of them were not at-bats
Times on base
4
hits, walks, and hit-by-pitches
Baseball averages are shown to three places, with the leading zero dropped.
What this tool covers
One tool for the two sports that use the term and mean different things by it — plus the on-base, slugging and strike-rate figures that belong beside each average.
Baseball and softball: hits ÷ at-bats, shown to three places as .300
Cricket: runs ÷ dismissals, where a not-out adds runs but no dismissal
On-base percentage, slugging and OPS — the honest answer to whether walks count
Free, no signup — arithmetic on your counts, not a scoring ruling.
Updated 5 September 2026 · Works in any browser, no installation
In baseball and softball, batting average is hits divided by at-bats. Four hits in six at-bats is 4 ÷ 6 = .667. In cricket it is runs divided by dismissals — innings batted minus not-outs — so 500 runs from 12 innings with 2 not-outs is 500 ÷ 10 = 50.00. The two numbers share a name and nothing else, and everything below is that difference worked through.
At a glance
Formula shown
Baseball and softball: BA = Hits ÷ At-Bats. Cricket: Average = Runs ÷ (Innings − Not-Outs).
Scenario support
A single player, a whole team or career pooled from its raw counts, and a pitcher's opponent batting average.
Educational estimate
Planning support from the values you enter — not professional advice.
Two sports, two formulas — and only one of them is a proportion
Baseball and softball
BA = Hits ÷ At-Bats
A share of chances taken, so it runs from .000 to 1.000 and can never pass it.
Cricket
Average = Runs ÷ (Innings − Not-Outs)
Runs per dismissal, so it has no upper limit at all — Bradman’s is 99.94.
These are not the same calculation with different words. A baseball batting average asks a frequency question — of the times you had a genuine chance to get a hit, how often did you? The answer is a proportion, and because every hit is also an at-bat, it is mathematically impossible for it to exceed 1.000. A cricket batting average asks a duration question instead: how many runs do you make before you get out? The answer is a rate, measured in runs per dismissal, and nothing caps it. That is why an average of 50 is a career-defining figure in cricket and a physical impossibility in baseball, and why the two should never be put on the same axis.
The definitions behind the baseball side are set out in the Official Baseball Rules rather than by convention. Rule 9.21(b) defines batting average as the total number of safe hits divided by the total times at bat. Rule 9.02(a)(1) then defines at-bats negatively, by listing the completed plate appearances that do not count as one: a sacrifice bunt, a sacrifice fly, a base on balls, a hit by pitch, and an award of first base for interference, obstruction, or a shift-restriction violation. That list is exhaustive, which is what makes the arithmetic unambiguous — everything else, including reaching base on an error or a fielder’s choice, is an at-bat with no hit and pulls the average down.
Cricket has no equivalent rulebook definition, and it is worth saying so plainly. Neither the MCC Laws of Cricket nor the ICC playing conditions define a batting average at all; Law 3 requires scorers to record runs, wickets and overs, and the average is a statistical convention built on top of what those records contain. What the Laws do settle is the input the convention depends on — what counts as a dismissal and what counts as a not-out — and that is enough to make the calculation exact. A batter retiring through injury is recorded under Law 25.4.2 as “Retired – not out”, so the innings counts and the dismissal does not; a batter retiring for any other reason is recorded as retired out, and the dismissal does count.
Walks cannot move a batting average, and that is the whole reason on-base percentage exists
No, walks are not counted in a batting average — not as a hit, and not as an at-bat. Because a base on balls is excluded from at-bats by Rule 9.02(a)(1)(B) and is not a hit under Rule 9.05, it leaves both halves of the fraction untouched, so it cannot raise the average and cannot lower it. The cleanest demonstration is the extreme case: a batter who walks four times in four trips to the plate finishes the day with four plate appearances, zero at-bats, and no batting average at all — the denominator is zero. This calculator reports that as a dash rather than as .000, because .000 would read as four failures when in fact the batter reached base every single time.
It was not always so. For exactly one season, in 1887, Major League Baseball counted walks as hits; the experiment was reversed the following year on the reasoning that a batting average should reflect a batter’s hitting rather than their overall ability to reach base. The statistic that took on the second job is on-base percentage, defined in Rule 9.21(f) as hits plus walks plus hit-by-pitches, over at-bats plus walks plus hit-by-pitches plus sacrifice flies. Enter your walks in the tool above and the average will not budge while the on-base percentage climbs — which is exactly the point, and the reason a hitter with a modest average and a good eye is far more valuable than the average alone suggests.
One asymmetry in that formula catches almost everyone, so it is worth stating on its own. A sacrifice fly is in the on-base denominator; a sacrifice bunt is not. Neither is an at-bat, so neither touches the batting average, but the fly costs you on-base percentage and the bunt is free. The rule’s comment adds a third case that most calculators miss entirely: a batter awarded first base on interference, obstruction, or a shift-restriction violation is ignored in both the numerator and the denominator of on-base percentage, even though it counts as a plate appearance. The tool follows all three rules, which is why it asks for flies and bunts in separate boxes rather than as one “sacrifices” field.
Softball works the same way with one genuine divergence worth knowing if you play slow pitch. USA Softball’s rules tag the hit-by-pitch award as fast pitch only — in slow pitch a pitch that strikes the batter is simply a ball, and the plate appearance continues — and bunting is not a sacrifice but an out, since Rule 7 Sec. 6.J puts the batter out for bunting or chopping the ball. So in slow pitch those two boxes stay at zero, not because the tool ignores them but because the events do not exist.
A not-out adds the runs and no dismissal, which is why the denominator is not innings
The single most common error in a cricket batting average is dividing by innings. Runs made in a not-out innings do count, in full, in the numerator; the innings itself does not add to the denominator, because the batter was never dismissed and so that innings tells you nothing about how many runs they make before getting out. The denominator is dismissals, and dismissals are innings batted minus not-outs.
Bradman’s record makes the size of the difference concrete and is worth checking by hand. His Test career was 6,996 runs from 80 innings with 10 not-outs. Divide by the 70 dismissals and you get 99.94, the figure the ICC Hall of Fame publishes. Divide by the 80 innings instead and you get 87.45 — still extraordinary, and still wrong by more than twelve runs an innings. The tool shows both figures side by side for exactly this reason: the runs-per-innings number is displayed next to the average, labelled as the wrong denominator, so the gap is visible rather than asserted.
This is also why a specialist finisher can carry an average well above what their scores suggest. A batter who is regularly stranded unbeaten at the end of an innings accumulates runs in the numerator without adding to the denominator, and their average rises accordingly. Whether that flatters them is a genuine cricketing argument; it is not an arithmetic error, and the convention is the same for everyone. What is unambiguous is the limiting case: a batter who has never been dismissed has no average at all. The denominator is zero, so the value is undefined — not infinite, and certainly not zero — and a scorecard prints a dash. The tool does the same, and says why.
The bowling side of the scorecard is on the same page because a cricket calculator that explains one average and not the other sends you elsewhere for the second half of the question. Bowling average is runs conceded per wicket, bowling strike rate is balls per wicket, and economy rate is runs per six-ball over. That last one hides a real trap: overs are written in cricket’s X.Y notation, where the digit after the point is a count of balls from 0 to 5, not a decimal fraction. Ellyse Perry’s published ODI figures are 4,243 runs from 967.4 overs, which is 5,806 balls; dividing by balls and multiplying by six gives the published economy of 4.38, whereas treating “967.4” as the decimal 967.4 gives 4.39. The engine here converts through balls, so the notation cannot corrupt the answer.
What counts as a good average, quantified against its own competition
A batting average means nothing in isolation — it only means something against the standard of the sport, level and era it was made in. The numbers below are quoted with the season or competition they come from, because a threshold with no stated basis is folk wisdom rather than information.
In Major League Baseball, .300 is the traditional mark of an excellent season, and it is a high bar because the league itself hits nowhere near it. Summing all thirty clubs’ official 2025 totals gives 40,138 hits from 163,664 at-bats — a league-wide .245. So a .300 hitter is roughly a fifth better than average, not a fifth better than nothing. The all-time records changed recently and most pages still quote the old ones: when MLB brought seven Negro Leagues into the Major League record in May 2024, Josh Gibson became the all-time leader in both career batting average, at .372 from 860 hits in 2,313 at-bats, and single-season, at .466 from 116 hits in 249 at-bats in 1943. Ty Cobb is now second on the career list at .367. Ted Williams’s .406 in 1941, from 185 hits in 456 at-bats, remains the last .400 season in the American or National League.
In cricket the ceiling is set by one man and everyone else is compressed well below it. Bradman’s Test 99.94 is not merely the highest — it is roughly sixty per cent clear of the next name. Below him, a Test average above 60 is historically almost unreachable; Cricket Australia’s list of the highest Test averages among players with at least twenty matches contained just two names, Bradman at 99.94 and Adam Voges at 61.87, and Marnus Labuschagne passed Voges at 62.48 in late 2021. An average above 50 marks an elite Test career — Steve Smith’s sits at 53.97 across 125 Tests — and the low-to-mid 40s is a strong, established top-order career. White-ball benchmarks sit a little lower: a mid-40s ODI average was reported by Cricket Australia as roughly fifteenth all time among players with thirty or more matches, and Ellyse Perry’s ODI average of 48.22 is an elite modern reference point.
Softball numbers are much higher than baseball’s, and slow pitch is higher again — comparing across them is meaningless. The NCAA’s own statistical trends put the Division I composite batting average at .283 for 2025, against a range of roughly .265 to .287 across recent seasons and an all-time division high of .287 in 2015. Individual Division I champions bat far above that: Haley Ahr of Marist led 2025 at .508, from 90 hits in 177 at-bats. The Division I single-season record is .589, set by Sara Graziano of Coastal Carolina in 1994 with 103 hits in 175 at-bats. Men’s major slow pitch operates in another register entirely — USA Softball’s National Softball Hall of Fame records Mike Shenk’s lifetime slow-pitch average as .701, with a high season of .739. A .400 average would be outstanding in MLB, ordinary in Division I softball, and poor in competitive slow pitch, which is precisely why the sport and level have to be stated alongside the figure.
It is also worth knowing that batting average has lost ground as a measure of a hitter. Because it discards walks entirely, treats a single and a home run as identical, and says nothing about how often a batter avoids making an out, modern analysis leans on on-base percentage, slugging and OPS instead — all three of which the tool computes alongside the average, so you can see the same player under all four lenses at once.
A team average pools the counts — averaging the averages is a different, wrong number
A team batting average is the team’s total hits divided by the team’s total at-bats. It is not the mean of the individual players’ averages, and the difference is not small. Averaging the averages hands a bench player with nine at-bats exactly the same weight as an everyday starter with six hundred, so a single small sample with a lucky line can drag the whole figure somewhere the team never was.
The tool’s default example is deliberately the minimum case that shows it. A starter batting 180 for 600 averages .300; a bench player who went 4 for 9 averages .444. Pool the raw counts and the two together are 184 hits from 609 at-bats, which is .302. Take the mean of .300 and .444 and you get .372 — seventy points of pure artefact, produced entirely by treating nine at-bats as equal to six hundred. The two methods agree only in the special case where every player has exactly the same number of at-bats, which no real roster ever does.
A career average across seasons is the identical trap wearing different clothes, and the tool’s team mode handles it by letting you label the rows as seasons instead of players. Derek Jeter’s official career line is 3,465 hits from 11,195 at-bats, which pools to .310 — the figure MLB publishes. The unweighted mean of his twenty individual season averages is .302, eight points adrift, because his first partial seasons carry as much weight in that calculation as his full ones. Cricket has exactly the same problem across formats: pooling Pat Cummins’s Test, ODI and T20I batting gives a combined 15.30, while averaging his three published format averages gives something materially different. Always sum the numerators and sum the denominators.
The opponent-batting-average mode applies the same care to a pitcher’s line, where the difficulty is entirely in the denominator. Batters faced counts every plate appearance, but batting average is a rate per at-bat, so the walks, hit batters and sacrifices have to come back out before dividing. Tarik Skubal’s 2025 season is a clean check: 748 batters faced, less 33 walks, 5 hit batters, 2 sacrifice bunts and 2 sacrifice flies, leaves 706 at-bats against; 141 hits allowed over 706 is the published .200. Enter batters faced without the exclusions and the denominator is too large and the figure too flattering, which is why the tool asks for them separately.
The short-series chart: what every line from three to ten at-bats works out to
Most batting-average questions are about a single game or a short series, where the at-bat count is small and the answer is one of a handful of values. The table below lists every possible line for three, four, five, six and ten at-bats. Each row is generated by the same engine that powers the calculator above rather than typed by hand, so the chart and the tool cannot drift apart.
Every possible batting average for three, four, five, six and ten at-bats
At-bats
Hits, and the average each gives
3
0 for 3 = .000 · 1 for 3 = .333 · 2 for 3 = .667 · 3 for 3 = 1.000
4
0 for 4 = .000 · 1 for 4 = .250 · 2 for 4 = .500 · 3 for 4 = .750 · 4 for 4 = 1.000
5
0 for 5 = .000 · 1 for 5 = .200 · 2 for 5 = .400 · 3 for 5 = .600 · 4 for 5 = .800 · 5 for 5 = 1.000
6
0 for 6 = .000 · 1 for 6 = .167 · 2 for 6 = .333 · 3 for 6 = .500 · 4 for 6 = .667 · 5 for 6 = .833 · 6 for 6 = 1.000
10
0 for 10 = .000 · 1 for 10 = .100 · 2 for 10 = .200 · 3 for 10 = .300 · 4 for 10 = .400 · 5 for 10 = .500 · 6 for 10 = .600 · 7 for 10 = .700 · 8 for 10 = .800 · 9 for 10 = .900 · 10 for 10 = 1.000
The most-searched line on that list is 4 for 6, which is .667— and it is worth a word of warning, because the phrase is ambiguous across the two sports. In a baseball box score “went 4 for 6” means four hits in six at-bats. In cricket, “four for six” is a bowling figure: four wickets taken while conceding six runs, which has nothing to do with batting at all. The shorthand box in the calculator accepts “4 for 6”, “4-for-6” and “4/6”, but deliberately refuses a bare “4-6”, because reading a bowling figure as a batting line would quietly produce a wrong answer rather than an obvious one.
One thing the chart makes visible is how coarse a short series is. Over four at-bats there are only five possible averages, and each extra hit moves the figure by 250 points; over ten there are eleven, each worth 100 points. That is why single-game averages swing so violently and why the batting title has a qualification threshold at all — the Official Baseball Rules require a qualified player to have at least 3.1 plate appearances per scheduled game, precisely so that a two-hit afternoon cannot win it.
In Excel or Google Sheets, the formula is easy and the display is the fiddly part
The calculation itself is one division. With hits in B2 and at-bats in C2, =B2/C2 is the whole thing. What breaks a real spreadsheet is a player with no at-bats yet, which returns #DIV/0! and propagates into every total that touches it. Microsoft’s own guidance on the error names testing the denominator as the simplest remedy, which here is =IF(C2=0, "", B2/C2).
=IFERROR(B2/C2, "") also works and is shorter, but it is a blunter instrument and worth choosing deliberately rather than by habit: Microsoft documents IFERROR as trapping seven different error types — #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL! — so it will also silently swallow a typo that put text in the at-bats column. The explicit denominator test fails loudly on that, which in a season-long scoresheet is usually what you want. Both arguments of IFERROR are required in Excel; in Google Sheets the second is optional.
Getting the number to look like a batting average takes a custom format rather than a formula, and this is the part most guides get wrong. The code is #.000. The three zeros are digit placeholders that force exactly three decimal places, so .3 displays as .300; the leading # is the placeholder that shows a digit only when one is significant, which is what suppresses the zero before the point. Use 0.000instead and you get 0.300, which is correct arithmetic and wrong convention. In Excel, apply it through Format Cells → Number → Custom; in Google Sheets, through Format → Number → Custom number format.
For a team total, sum the two columns and divide the sums — =SUM(B2:B26)/SUM(C2:C26) — and do not be tempted by =AVERAGE(D2:D26) over a column of per-player averages. That is the aggregation trap from the section above, in spreadsheet form, and it is easy to reach for because the function name sounds like exactly what you want. Formatting is display only: it changes what is shown, not what is stored, so a cell showing .300 may hold 0.29954 and will keep that full precision in any later arithmetic. Wrap the division in ROUND only if you genuinely want the stored value rounded, which for a figure you are going to sum or compare later you usually do not.
Expected batting average is a tracking statistic, and no box score can produce it
Expected batting average (xBA) turns up often enough alongside these searches to be worth answering directly: this calculator cannot compute it, and neither can any tool that starts from hits and at-bats. It is a Statcast metric, and it works by giving every batted ball a hit probability drawn from how often historically comparable balls actually became hits — where “comparable” is defined by the ball’s exit velocity and launch angle, and on certain batted-ball types by the batter’s seasonal sprint speed as well. Strikeouts are then folded back in to put the result on the batting-average scale.
Every one of those inputs is a physical measurement taken by tracking equipment during the game, and the comparison set is a proprietary database MLB has built from league-wide Statcast data. There is no closed-form formula and no public coefficient table, so a figure has to be looked up from Baseball Savant rather than derived. Any calculator that offered to compute xBA from a box score would be inventing a number and presenting it as a measurement, which is why this one declines and says so instead.
There is a smaller version of the same honesty problem in the ordinary figures, and it is worth stating rather than hiding. Averages are conventionally shown to two decimal places in cricket and three in baseball, but the last digit is not canonical, because publishers disagree about how to get there. This engine rounds half away from zero — the rule that reproduces MLB’s published figures, including genuine ties such as a slugging percentage of exactly 29/80, which is .3625 and publishes as .363. Cricket Australia truncates some of its rates instead, so a strike rate this tool reports as 10.25 appears there as 10.24. Expect published sources to differ from each other by up to one hundredth in the final digit, and do not treat a one-digit disagreement as an error in either.
Related calculators
Other averages, ratios and percentages:
Standard DeviationSample and population standard deviation, plus variance, mean, median, quartiles, z-scores, outliers, and confidence intervals.
PercentageSolve X% of Y, what percent X is of Y, reverse percentage, increase/decrease, discounts, and tax, tip, or commission.
GradeCalculate your weighted overall grade from categories or points, or find the score you need on your final exam.
GPACalculate your GPA from letter grades or percentages and credit hours, or combine a new term with your existing cumulative GPA.
Percentage ChangeWork out percentage increase or decrease, reverse change, loss recovery, percentage points, multi-period change, and CAGR.
Fraction to PercentConvert a fraction, mixed number, or decimal to a percent and back, with every step of the working shown.
Every figure on this page is computed from the counts you enter — nothing is fetched, and there is no live data feed behind it. The arithmetic is a division and needs no authority, but the definitions do, and that is what the sources below settle: which plate appearances count as at-bats, which events belong in the on-base denominator, how a not-out and a retirement are recorded, and the scoring differences between fast pitch and slow pitch. Every record, league average and benchmark quoted above is given with the season or competition it comes from, because a threshold with no stated basis cannot be checked. All links were opened and confirmed to contain what is attributed to them on the date shown. Links open in a new tab.
This calculator performs exact arithmetic on the counts you enter, so the averages themselves are correct to the precision shown. What it cannot check is whether the counts are right. Whether a ball was a hit or a fielder’s error, whether a batter was credited with a sacrifice, and how a retirement or an abandoned innings is recorded are rulings made by an official scorer under a particular rulebook, and league, school, and recreational competitions frequently modify those rules — slow-pitch softball, for instance, has no hit-by-pitch award and no sacrifice bunt at all. Published averages also disagree in the last displayed digit, because some governing bodies round and others truncate. For anything official — a selection decision, a record claim, an eligibility question — work from your competition’s own scorecard and its scoring regulations.
Published the Batting Average Calculator: baseball and softball batting average as hits over at-bats, and cricket batting average as runs over dismissals (innings minus not-outs), computed under each sport's own scoring definitions rather than one shared formula.
Added on-base percentage, slugging, and OPS beside the baseball average so the 'do walks count' question is answered with the statistic that actually credits them, plus cricket strike rate and bowling average, a pooled team and career average that shows why averaging the averages is wrong, and a pitcher's opponent batting average.
Launched the Sports category, the site's eleventh public category, with this as its first tool.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.