Baseball Batting Average Calculator (Hits ÷ At-Bats)
Baseball batting average from hits and official at-bats, or the hits you need to reach .300 — plus how far one more hit or one more out moves the number.
Batting Average Calculator
Background.
A hitter comes to the plate five times, draws four walks and singles once. His batting average for the day is 1.000. That is not a scoring quirk; it is the definition working exactly as written. Official Baseball Rule 9.21(b) tells the scorer to divide "the total number of safe hits (not the total bases on hits) by the total times at bat", and times at bat is a narrower count than trips to the plate. Walks, hit-by-pitches, sacrifice bunts, sacrifice flies and awards of first base for interference or obstruction are all left out of it under Rule 9.02(a)(1).
So the arithmetic is one division, and nearly every wrong batting average comes from the denominator. Use plate appearances and a patient hitter is punished for every walk. Use total bases in the numerator and you have computed slugging percentage. A box score that prints AB has already removed the exclusions for you; a season line that only gives PA needs them subtracted first.
The question fans and players ask most often, though, is not what the average is but what it will take to change it — how many hits get a .287 hitter to .300 by the end of the season, or how much one bad week can cost. The calculator answers those by solving the same identity for hits or for at-bats, and by showing where the average would sit after one more hit and after one more out. Those last two figures say more about how settled a season is than any commentary: in April a single at-bat can move an average by ten points, while by September it barely moves at all.
What is batting average calculator?
Batting average (AVG or BA) is the share of a hitter's official at-bats that ended in a safe hit — a single, double, triple or home run, each counted once. It is written to three decimal places with the leading zero dropped, so 211 hits in 636 at-bats is printed .332 and read aloud as "three thirty-two". Reaching base on an error or a fielder's choice is charged as an at-bat but is not a hit, so it lowers the average. The scale runs from .000 to 1.000; MLB's glossary puts the recent league-wide figure at roughly .250, and .300 has long marked an excellent season. Seen from the mound, the same ratio of hits allowed to opponents' at-bats is a pitcher's batting average against. It is a rate, not a total: a player can lead the league in hits without leading it in average, because the denominator grows with every at-bat he takes.
How to use this calculator.
- Pick the question: the average from a known line of hits and at-bats, the hits needed to reach a target average, or the at-bats implied by a hit total and an average.
- Enter safe hits — singles, doubles, triples and home runs added together. Times on base by error, fielder's choice, walk or hit-by-pitch are not hits.
- Enter official at-bats from the AB column of a box score or stat line. If your source only gives plate appearances, subtract walks, hit-by-pitches, sacrifice bunts, sacrifice flies and interference or obstruction awards first.
- For the two reverse modes, type the target as a decimal: .300 is 0.3 and .275 is 0.275. The target must be above zero and no higher than 1.
- Read the average to three decimals as baseball prints it, then compare the after-next-hit and after-next-out figures to see how much a single at-bat can still swing it.
The formula.
The forward calculation is AVG = H ÷ AB. The two reverse modes rearrange it: hits needed is H = AVG × AB, and the at-bats a hit total implies is AB = H ÷ AVG. Neither reverse answer is rounded to a whole number, because the exact figure is more informative — 211.152 hits tells you that 211 falls just short of .332 and 212 clears it, which a rounded 211 would hide. In real life, round hits needed up to the next whole hit. Hitless at-bats are simply AB − H. The two look-ahead outputs come from adding one at-bat. A hit adds one to both counts, giving (H + 1) ÷ (AB + 1); an out adds one to the denominator only, giving H ÷ (AB + 1). Subtracting gives the size of each move: a hit gains (AB − H) ÷ [AB × (AB + 1)] and an out costs H ÷ [AB × (AB + 1)]. The common denominator explains why both shrink so quickly as a season goes on — it grows roughly with the square of at-bats — and the numerators explain the asymmetry: a hit is worth more than an out costs whenever the hitter has more outs than hits, which is any average below .500. The ratio between the two moves is exactly outs ÷ hits, a little over 2 for a .332 hitter and 3 for a .250 hitter. Hits can never exceed at-bats, since every hit is itself an at-bat, so an average above 1.000 is impossible and is refused, as is a line with zero at-bats, whose average is undefined and is printed as a dash on scorecards.
A worked example.
Bobby Witt Jr. won the 2024 American League batting title with 211 hits in 636 official at-bats, according to the MLB Stats API. Dividing 211 by 636 gives 0.3318, which baseball prints as .332 — the figure in MLB's record for that season. The at-bats-implied mode shows how much that last digit hides: 211 hits at exactly .332 would take 211 ÷ 0.332 = 635.54 at-bats, so his true average sits a shade below the printed one. Subtracting hits from at-bats leaves 425 hitless at-bats, so even the league's best hitter by this measure failed to get a hit in two of every three official trips. One more hit would have made him 212 for 637, which is 0.3328: a gain of 0.00105, about one point. One more out would have made him 211 for 637, or 0.3312: a loss of 0.00052, about half a point. The ratio between them, 425 ÷ 211 = 2.01, is just his outs divided by his hits. With more than 600 at-bats banked, even an 0-for-20 final week would have cut his average only to 211 ÷ 656 = 0.3216.
Frequently asked questions.
Which trips to the plate are not counted as at-bats?
If I reach base on an error, does it count as a hit?
Does a sacrifice fly lower my batting average?
What counts as a good batting average?
How many plate appearances do you need to win a batting title?
How many hits do I need to finish the season at .300?
Why does a hit raise my average more than an out lowers it?
How is batting average different from on-base percentage?
Can I use this for a pitcher's batting average against?
Is a baseball batting average the same as a cricket batting average?
References& sources.
- [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]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]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 by this calculator.
- [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]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]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]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.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 7 cited below
- Method
- AVG = H ⁄ AB
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled