Batting Average Calculator: Compute AVG and OBP
Batting average and on-base percentage
Try the calculator
Math runs in your browser. No sign-up.
Hits per at-bat. Conventionally written without a leading zero.
150 hits in 500 at-bats is a .0.3 average with a 0.366 OBP.
Batting average is hits divided by at-bats. On-base percentage is (hits + walks + hit-by-pitch) divided by (at-bats + walks + hit-by-pitch + sacrifice flies). 150 hits in 500 at-bats is a .300 average; with 50 walks the OBP rises to .366.
Batting average divides hits by at-bats and has been baseball's headline statistic for over a century. Its weakness is well understood: it treats a walk as though it never happened, because walks are not at-bats, so a patient hitter who reaches base constantly can post a mediocre average. On-base percentage corrects this by counting walks and hit-by-pitches in both the numerator and the denominator, along with sacrifice flies in the denominator only. The two figures frequently tell different stories about the same player, and on-base percentage correlates considerably better with run scoring β which is why it displaced average as the preferred measure in front offices.
What is a batting average?
Calculate batting average and on-base percentage from hits, at-bats, walks, hit-by-pitches and sacrifice flies. Batting average ignores walks entirely, because walks are not at-bats, which is why a patient hitter can post a modest average while reaching base constantly. On-base percentage counts every way of reaching base and correlates far better with run scoring β the reason it displaced average as the preferred measure in front offices.
The formula
Source: Official Baseball Rules 9.22 (batting average) and 9.23 (on-base percentage).
Worked examples
1A .300 season with good plate discipline
One hundred and fifty hits in five hundred at-bats is a .300 average. Adding fifty walks and five hit-by-pitches across 560 plate appearances lifts on-base percentage to .366. The 66-point gap sits right at league-typical, indicating a hitter whose patience is solid without being a defining strength.
2A partial season with a weaker average
Forty-five hits in two hundred at-bats is .225, well below average. But twenty walks in 225 plate appearances produce a .298 on-base percentage and a 73-point gap above the batting average. This is the classic case where average alone misleads: the player reaches base far more often than .225 suggests.
How to use this calculator
- Hits (default: 150)
- At-bats β Plate appearances excluding walks, hit-by-pitches, sacrifices and catcher's interference.
- Walks (default: 50)
- Hit by pitch (default: 5)
- Sacrifice flies (default: 5)
- Read the result. Use the worked examples below to sanity-check against a known scenario.
Common mistakes and edge cases
Using plate appearances instead of at-bats
At-bats exclude walks, hit-by-pitches and sacrifices. Dividing hits by total plate appearances understates the average, typically by 20β30 points.
Leaving walks out of OBP
Walks belong in both numerator and denominator. Omitting them collapses on-base percentage back toward batting average and discards the entire point of the statistic.
Putting sacrifice flies in the numerator
They appear only in the denominator. A sacrifice fly is a productive out, not a time reaching base, and adding it above the line inflates the figure.
Reading average as overall hitting quality
Average ignores both walks and power. A .260 hitter with a .380 on-base percentage and real extra-base power is far more valuable than a .300 hitter who never walks.
Frequently asked questions
how do I calculate batting average
what is the formula for on-base percentage
why is OBP higher than batting average
do walks count as at-bats
which statistic matters more
Batting Average glossary
How we built this calculator
Methodology
Batting average is hits over at-bats, conventionally written to three decimals without a leading zero: 150 hits in 500 at-bats is .300, the traditional benchmark of a good season. The key subtlety is what counts as an at-bat. Walks, hit-by-pitches, sacrifice bunts, sacrifice flies and catcher's interference are plate appearances but not at-bats, so they are invisible to the average entirely.
Sources & references
Every numeric assumption traces to a primary source.
- Major League Baseball β Official Baseball Rules, Rule 9: StatisticsUSA
- Society for American Baseball Research β Statistical Analysis CommitteeUSA
- National Collegiate Athletic Association β Baseball Statisticians' ManualUSA
- Numora Editorial Policy. numora.net/editorial-policy