Batting Average Calculator
Enter hits and at-bats for batting average, then add walks, hit-by-pitch, and sacrifice flies to also get on-base percentage (OBP). See how your BA compares to the classic .300 benchmark and the current MLB league context.
How you compare
Your batting average vs. the classic .300 benchmark and current MLB league context
How batting average works
Batting average answers one narrow question: out of the times a player was officially at-bat, how often did they get a hit? It excludes walks, hit-by-pitches, and sacrifice bunts/flies from the denominator entirely, which is why two hitters with very different overall value can share the same BA. On-base percentage widens the lens to include walks and HBP as ways of reaching base, which is why teams increasingly weight OBP alongside or above batting average.
How it’s calculated
Batting average = Hits ÷ At-bats. On-base percentage = (Hits + Walks + HBP) ÷ (At-bats + Walks + HBP + Sacrifice flies). Both are official MLB scoring-rule formulas.
Educational estimate for any stat line you enter — not an official MLB or league statistics feed.
Worked example
165 hits in 550 at-bats gives a batting average of exactly .300 — 3 hits every 10 at-bats. Adding 60 walks, 5 hit-by-pitches, and 6 sacrifice flies to that same player's season, on-base percentage comes out to .370: (165+60+5) ÷ (550+60+5+6) = 230 ÷ 621. That 70-point gap between .300 BA and .370 OBP is entirely from the walks and HBP that batting average leaves out.
Common mistakes
- Including walks or sacrifice bunts in the at-bats total — MLB's official scoring rules exclude both from at-bats.
- Treating batting average as a complete offensive stat on its own — it says nothing about power (see OPS) or plate discipline (see OBP).
- Comparing a single hot or cold week to a full-season .300 benchmark — small samples swing wildly; BA stabilizes over hundreds of at-bats.
- Forgetting sacrifice flies count against OBP's denominator even though they don't count as at-bats for BA.
Where it is used
- The most widely cited single number for a hitter's contact skill, in box scores and broadcasts.
- A building block for on-base percentage, OPS, and most other rate-based hitting stats.
- Historical and cross-era comparisons of hitters, alongside era-adjusted context.
Frequently asked questions
What is the Mendoza Line?
The "Mendoza Line" is baseball slang for a .200 batting average — named (somewhat unfairly) after infielder Mario Mendoza, whose career average hovered near that mark in the late 1970s. Hitting "below the Mendoza Line" is shorthand for a batting average so low it puts a position player's roster spot in jeopardy, regardless of defense.
Why is .300 considered a great batting average?
A .300 average means getting a hit in 3 of every 10 at-bats — a level only a modest share of qualified MLB hitters reach in a full season, since even great hitters make an out roughly 65-70% of the time. It's a round, memorable number that's been used as the line between "good" and "very good" hitting for over a century, even as the league-average batting average has drifted over different eras.
What's the difference between batting average and OBP?
Batting average only counts hits divided by at-bats, so it ignores walks and hit-by-pitches entirely — a player who draws 100 walks a year gets no BA credit for any of them. On-base percentage (OBP) counts any way of reaching base (hits, walks, HBP) divided by all plate appearances that could have ended in an out (at-bats, walks, HBP, sac flies), which is why analysts consider OBP a more complete measure of a hitter not making outs.
Does batting average count walks or sacrifice flies?
No. Batting average is hits ÷ at-bats, and neither walks nor sacrifice flies count as an at-bat under MLB's official scoring rules, so they don't appear anywhere in the BA formula. They do factor into on-base percentage, which is why a high-walk, lower-BA hitter can still be extremely valuable — OBP will reflect it even though BA doesn't.
Why did league batting average change over time?
League-wide batting average shifts with the balance between pitching and hitting in a given era — strikeout rates, the size of the strike zone, ball composition, and defensive shifts all move it. Baseball-Reference's year-by-year league tables show these swings directly; rather than one fixed "good" number, .300 is best read relative to whatever the league is doing that season.