Audited ·Last updated 28 Jul 2026·7 citations·Tier 1·0 uses

Baseball Batting Average Calculator (Hits ÷ At-Bats)

Free baseball batting average calculator: hits ÷ at-bats, straight from Official Baseball Rule 9.21(b). Also solves for the hits you need to hit a target.

Batting Average Calculator

What do you want to work out?
Singles, doubles, triples and home runs added together. Reaching base on an error, a fielder's choice or a walk is not a hit.
Plate appearances minus walks, hit-by-pitches, sacrifice bunts, sacrifice flies and interference awards. Official Baseball Rule 9.02(a)(1) lists all five exclusions.
Used only by the two inverse modes. Enter it as a decimal — .300 is 0.3.
Batting average
0.3318
Safe hits divided by official at-bats, the quotient Official Baseball Rule 9.21(b) defines. Baseball prints it to three decimal places with the leading zero dropped, so 0.332 is read as '.332', or 'three thirty-two'.
Safe hits
211
Official at-bats
636
At-bats without a hit
425
Average after one more hit
0.3328
Average after one more out
0.3312

Background.

Batting average is the oldest rate statistic in baseball and the one every fan can recite, but it is also the one most often computed with the wrong denominator. The official definition is a single line in the Official Baseball Rules. Rule 9.21(b) instructs the scorer to compute batting average by dividing "the total number of safe hits (not the total bases on hits) by the total times at bat, as defined in Rule 9.02(a)". Hits over at-bats. Not hits over plate appearances, not hits over games, and emphatically not total bases over at-bats — that last one is slugging percentage, a different statistic entirely.

The whole difficulty lives in the denominator. An at-bat is not the same thing as a turn at the plate. Rule 9.02(a)(1) says no time at bat shall be charged when a player hits a sacrifice bunt or a sacrifice fly, is awarded first base on four called balls, is hit by a pitched ball, or is awarded first base because of interference, obstruction or a shift restriction violation. Five different ways of completing a plate appearance simply vanish from the batting-average calculation. A hitter who walks four times and singles once in five trips to the plate is 1-for-1 and batting 1.000 for the day. That is not a quirk of the arithmetic; it is the design, and it is precisely why on-base percentage was invented.

This calculator implements Rule 9.21(b) exactly and adds two inverse modes, because the two questions fans actually ask are rarely "what is my average?" — they usually already know that — but "how many hits do I need?" and "how many at-bats does that average imply?". Both are the same identity rearranged. The forward-looking outputs answer the question underneath all three: how much does the next plate appearance actually matter? A hitter at .332 over 636 at-bats gains about one point of average for a hit and loses about half a point for an out, so a good week can move an average twice as fast as a bad one can drag it back. Early in a season the same two numbers are ten and twenty times larger, which is the arithmetic reason April batting averages are meaningless and September ones are hard to shift.

The page also draws a line that trips up a lot of search traffic. Cricket has a statistic called batting average too, and it is not this one. Cricket divides runs scored by the number of times the batter was dismissed, so a not-out innings makes the denominator smaller rather than larger. Baseball divides hits by at-bats. The two numbers share a name, live on completely different scales — a good cricket average is 50, a good baseball average is 0.300 — and cannot be converted into each other. Quanta has a separate cricket batting average calculator, linked below, and using the wrong one will produce a number that means nothing.

Below the widget you will find the rule text with its exact wording, the full list of plate-appearance outcomes that are and are not at-bats, a worked example reproducing the 2024 American League batting champion's line from official MLB data, the qualifying rule that decides who is even eligible for a batting title, an honest account of what the statistic misses — walks, extra-base power, situation, park, era — and the reason a .250 average meant something different in 1994 than it does today. The formula is dispatched at battingAverage.calculate in the Quanta engine and pinned by unit tests against the two figures the rulebook itself prints in its Rule 9.22(a) Comment.

What is batting average calculator?

Batting average (abbreviated AVG, or BA) is a hitter's safe hits divided by his official at-bats. It is expressed to three decimal places with the leading zero dropped: a hitter with 211 hits in 636 at-bats has a .332 average, spoken as "three thirty-two". Because the denominator excludes walks, hit-by-pitches, sacrifice bunts, sacrifice flies and interference awards, batting average measures success only across the plate appearances where the batter either got a hit or made an out on his own account. The scale runs from .000 to 1.000 in principle; in practice the league-wide figure has hovered near .250 in recent years, and no qualifying hitter has finished a Major League season above .400 since 1941. The same arithmetic applied from the pitcher's side gives batting average against (BAA or opponents' average), which MLB uses heavily in platoon splits precisely because a pitcher cannot have a separate ERA against left-handed hitters. Batting average is a rate, not a volume: it says nothing about how many hits a player accumulated, only how often the ones he took a real swing at landed safely. It is also entirely blind to what kind of hit it was — a bunt single and a grand slam both count as one hit — which is why slugging percentage and OPS exist alongside it.

How to use this calculator.

  1. Choose your mode. Leave it on the default to compute a batting average from a known line; switch to 'hits needed' or 'at-bats implied' to solve the same identity backwards.
  2. Enter safe hits. Add singles, doubles, triples and home runs together. Reaching base on an error, on a fielder's choice, or on catcher's interference is not a hit — those are outs or awards, not safe hits.
  3. Enter official at-bats, not plate appearances. If your source only gives you PA, subtract walks, hit-by-pitches, sacrifice bunts, sacrifice flies and any interference awards. Every box score that lists AB has already done this for you.
  4. For the inverse modes, enter the target average as a decimal: .300 is 0.3, .275 is 0.275. The calculator rejects a target above 1.000 because that would require more hits than at-bats.
  5. Read the primary result to three decimal places — that is how baseball prints it. The calculator carries ten places internally so that the 'after next hit' and 'after next out' figures are exact rather than rounded twice.
  6. Use the two forward-looking outputs to judge how settled the number is. If one hit moves the average by five points, the sample is far too small to describe the hitter; if it moves it by one point, the season is essentially decided.

The formula.

AVG = H ⁄ AB

The forward calculation is one division, and the rulebook states it in one clause: divide safe hits by times at bat. The work is all in assembling the denominator correctly.

Start from plate appearances — every completed turn at the plate. Then remove, in this order, the five outcomes Rule 9.02(a)(1) excludes: sacrifice bunts, sacrifice flies, bases on balls, hit-by-pitches, and awards of first base for interference, obstruction or a shift restriction violation. What remains is the at-bat total. The logic behind each exclusion differs. A walk and a hit-by-pitch are removed because the batter did not put a swing on a hittable pitch and should not be penalised for the pitcher's wildness. A sacrifice bunt is removed because it is a manager's instruction, not a hitter's choice. A sacrifice fly is removed for the same reason, although note carefully that it is removed from batting average and NOT from on-base percentage — that asymmetry is deliberate and is the single most common error in hand-rolled baseball calculators.

The two inverse modes are the identity rearranged. Solving for hits: H = AVG × AB. Ask what a .332 average requires over 636 at-bats and the answer is 211.152 hits, which in practice means 212, because a fraction of a hit does not exist. Solving for at-bats: AB = H ÷ AVG. Ask how many at-bats 211 hits implies at a .332 clip and the answer is 635.54, which tells you the real line was 636 at-bats with a shade of rounding in the published .332.

The two forward-looking outputs come from the same algebra. Adding a hit adds one to both numerator and denominator, giving (H + 1) ÷ (AB + 1); making an out adds one to the denominator only, giving H ÷ (AB + 1). Because the numerator grows in one case and not the other, the upward step is always larger in magnitude than the downward step for any average below 1.000. At 211-for-636 the gain is 0.00105 and the loss is 0.00052, almost exactly two to one.

One precision note. Baseball publishes averages to three decimals, and rounding at three decimals twice — once for the average, once for a derived figure — introduces error visible in the third place. This calculator carries full precision through every intermediate step and rounds once, at the display boundary, which is why the numbers here match the official figures rather than approximating them.

A worked example.

Example

Bobby Witt Jr. of the Kansas City Royals won the 2024 American League batting title. The official MLB Stats API returns his line as 211 safe hits in 636 official at-bats — 45 doubles, 11 triples and 32 home runs among them, though none of that detail matters to batting average, which counts every hit as one. Divide: 211 ÷ 636 = 0.331761006289…, which the calculator returns as 0.3317610063 and which baseball prints as .332. That is exactly the figure in MLB's own record for the season. The supporting outputs fill in the rest of the picture. He made 425 outs in his official at-bats — 636 minus 211 — so even a batting champion failed roughly two times in three. One more hit would have moved him to 212 ÷ 637 = .3328, a gain of just over one point; one more hitless at-bat would have moved him to 211 ÷ 637 = .3312, a loss of just over half a point. That two-to-one asymmetry is why a hot final fortnight can win a batting title and a cold one rarely loses it outright. For contrast, run the same 211 hits through the 'at-bats implied' mode with a target of .332 and you get 635.54 at-bats: the published .332 is a rounded figure, and the true average of 636 at-bats sits a hair below the round number. That gap of half an at-bat is the entire difference between .3317 and .3320, which is a useful reminder of how thin the margins in a batting race actually are.

hits211
at Bats636
target Average0.3
solve Foraverage

Frequently asked questions.

What is the batting average formula?
AVG = H ÷ AB — safe hits divided by official at-bats. Official Baseball Rule 9.21(b) puts it as "divide the total number of safe hits (not the total bases on hits) by the total times at bat". The parenthetical is there because the most common error is to use total bases, which gives slugging percentage instead. Batting average counts a home run and a bunt single identically: each is one hit.
Do walks count in batting average?
No. A base on balls is not an at-bat under Rule 9.02(a)(1), so it appears in neither the numerator nor the denominator — it leaves the average completely unchanged. The same is true of a hit-by-pitch, a sacrifice bunt, a sacrifice fly, and an award of first base for interference or obstruction. This is why a hitter who walks four times and singles once is batting 1.000 for the game, and it is the specific blind spot that on-base percentage was designed to close.
Does a sacrifice fly count against your batting average?
No, and this catches people out because it does count against on-base percentage. Rule 9.02(a)(1)(A) removes both sacrifice bunts and sacrifice flies from at-bats, so neither touches batting average. But Rule 9.21(f) puts sacrifice flies — and only sacrifice flies, never sacrifice bunts — back into the on-base percentage denominator. So the same sacrifice fly is invisible to AVG and lowers OBP. If a calculator treats the two statistics the same way on this point, it is wrong about one of them.
What is a good batting average?
Against the modern MLB baseline, .300 is the traditional marker of an excellent hitter and roughly .250 has been the league-wide average in recent seasons according to MLB's own glossary. But the scale drifts: .250 in a high-offence era is a below-average season and the same figure in a pitcher-dominated one is respectable, so the number is only interpretable against its own season. That drift is exactly why league-relative statistics such as OPS+ exist. No qualifying hitter has posted a .400 season since Ted Williams in 1941.
How many at-bats do you need to qualify for a batting title?
It is measured in plate appearances, not at-bats. Rule 9.22(a) requires 3.1 plate appearances per scheduled team game — 162 × 3.1 = 502.2, rounded down to 502 in a normal Major League season, and 2.7 per game in the Minor Leagues. There is an important exception in the same rule: a player short of the minimum still wins the title if adding the missing plate appearances as hitless at-bats would still leave him with the highest average. The rulebook works through that case in its own comment, and this calculator reproduces both figures from it.
How do I work out the hits I need to reach a target average?
Switch to the 'hits needed' mode and enter your at-bat total and target. The calculator multiplies: H = AVG × AB. Over 636 at-bats a .332 target requires 211.152 hits, which means 212 in the real world — always round up, because 211 hits over 636 at-bats produces .3318, which rounds to .332 only by luck of the display. If you want the average to be genuinely at or above the target, use the whole number above the calculated figure.
Can batting average be over 1.000 or below .000?
No on both counts. Every hit is by definition an at-bat, so hits can never exceed at-bats and the ratio is capped at 1.000 — usually seen only in tiny samples such as a pinch-hitter who is 1-for-1. It cannot be negative because neither count can be negative. The calculator rejects a hit total above the at-bat total and a target average above 1.000 for exactly this reason; if you hit that error, check whether you have accidentally entered plate appearances in the hits field.
Is this the same as a cricket batting average?
No — the two statistics share a name and nothing else. Cricket divides runs scored by the number of times the batter was dismissed, so an unbeaten innings adds runs to the numerator without adding anything to the denominator. Baseball divides hits by at-bats. The scales are not comparable either: a cricket average of 50 is outstanding, while a baseball average of 50 is arithmetically impossible. Use Quanta's separate cricket batting average calculator, linked in the related tools, for runs per dismissal.
Why do statisticians say batting average is overrated?
Because it throws away three things that matter enormously. It ignores walks entirely, so a patient hitter and a free-swinger with the same hit total look identical. It treats all hits as equal, so a season of 180 singles rates above a season of 175 hits with 45 home runs. And it says nothing about context — park, era, opposing pitching. On-base percentage fixes the first problem, slugging percentage the second, and OPS+ the third. Batting average survives because it is intuitive, historically continuous back to the 1870s, and still the fastest single read on whether a hitter is squaring the ball up.
Does batting average work for a single game or a small sample?
Arithmetically yes, and the calculator will happily divide 2 by 4 and give you .500. Interpretively, no. Use the 'after next hit' and 'after next out' outputs as your guide: over four at-bats a single hit swings the average by 100 points, so nothing about the number describes the hitter rather than the afternoon. The rulebook's own qualifying thresholds — 502 plate appearances for a full Major League season — exist precisely because the statistic is meaningless below a certain volume.

References& sources.

  1. [1]Office of the Commissioner of Baseball (2025). Official Baseball Rules, 2025 Edition, Rule 9.21(b): "Batting average, divide the total number of safe hits (not the total bases on hits) by the total times at bat, as defined in Rule 9.02(a)". This is the definition implemented on this page.
  2. [2]Office of the Commissioner of Baseball (2025). Official Baseball Rules, Rule 9.02(a)(1): no time at bat is charged when a player hits a sacrifice bunt or sacrifice fly, is awarded first base on four called balls, is hit by a pitched ball, or is awarded first base because of interference, obstruction or shift restriction violation. Source of the at-bat denominator used here.
  3. [3]Office of the Commissioner of Baseball (2025). Official Baseball Rules, Rule 9.22(a) and Comment: the 3.1-plate-appearance-per-scheduled-game qualifying minimum (162 × 3.1 = 502.2, rounded to 502), the 2.7 Minor League figure, and the worked example printing .365 for 165 hits in 452 at-bats against .362 for 181 hits in 500 at-bats — both reproduced as unit tests for this calculator.
  4. [4]Major League Baseball. Official MLB Glossary, "Batting Average (AVG)": hits divided by total at-bats, the recent league-wide figure of roughly .250, batting average against for pitchers, and the note that for one season in 1887 walks counted as hits.
  5. [5]Major League Baseball. Official MLB Glossary, "At-bat (AB)": "An official at-bat comes when a batter reaches base via a fielder's choice, hit or an error (not including catcher's interference) or when a batter is put out on a non-sacrifice", and the note that at-bats are the denominator for both batting average and slugging percentage.
  6. [6]Major League Baseball. Official MLB Glossary, "Rate Stats Qualifiers": the current 3.1 PA per scheduled game standard, in force since 1957 for batters, and the earlier standards (60% of scheduled games 1876–1919, 100 games 1920–1949, 400 at-bats 1950–1956).
  7. [7]MLB Stats API (statsapi.mlb.com), season hitting statistics for player 677951 (Bobby Witt Jr.), 2024: 636 at-bats, 211 hits, published avg ".332". Source of the worked example on this page.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 590 calculators remain free
  • No billing is enabled
Coming soon