Skip to main content
numora.
numora.

Batting Average Calculator: Compute AVG and OBP

Batting average and on-base percentage

SportsByΒ Numora Sports TeamNot yet reviewed

Try the calculator

Math runs in your browser. No sign-up.

Assumptions
Batting average
0.3

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.

On-base percentage0.366
Plate appearances560
OBP above average0.066
Embed this calculator on your own site β€” drop in a one-line iframe.
Quick takeaway

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

AVG = H Γ· AB Β· OBP = (H + BB + HBP) Γ· (AB + BB + HBP + SF)

Source: Official Baseball Rules 9.22 (batting average) and 9.23 (on-base percentage).

Worked examples

1A .300 season with good plate discipline

Inputs
hits: 150atBats: 500walks: 50hitByPitch: 5sacFlies: 5
Walkthrough

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

Inputs
hits: 45atBats: 200walks: 20hitByPitch: 2sacFlies: 3
Walkthrough

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

  1. Hits (default: 150)
  2. At-bats β€” Plate appearances excluding walks, hit-by-pitches, sacrifices and catcher's interference.
  3. Walks (default: 50)
  4. Hit by pitch (default: 5)
  5. Sacrifice flies (default: 5)
  6. 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
Divide hits by at-bats and express to three decimals. 150 hits in 500 at-bats is .300.
what is the formula for on-base percentage
(Hits + walks + hit-by-pitch) Γ· (at-bats + walks + hit-by-pitch + sacrifice flies). Sacrifice flies appear only in the denominator.
why is OBP higher than batting average
Because it counts walks and hit-by-pitches, which the average ignores. A gap of .060 to .070 is league-typical.
do walks count as at-bats
No. A walk is a plate appearance but not an at-bat, which is precisely why batting average is blind to plate discipline.
which statistic matters more
On-base percentage, by most analytical measures β€” it correlates more strongly with scoring runs. Neither captures extra-base power, which is what slugging percentage and OPS add.

Batting Average glossary

At-bat
A plate appearance excluding walks, hit-by-pitches, sacrifices and catcher's interference.
Plate appearance
Every completed turn at bat, including those that do not count as at-bats.
On-base percentage
The share of plate appearances in which a batter reaches base by hit, walk or hit-by-pitch.
Sacrifice fly
A fly ball out that scores a runner. Counted in the OBP denominator but not as an at-bat.

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.

Formula source
Official Baseball Rules 9.22 (batting average) and 9.23 (on-base percentage)
Last updated
2026-11-17
Calculation runs
Client-side only
NS
WRITTEN BY
Numora Sports Team

Sources & references

Every numeric assumption traces to a primary source.

  1. Major League Baseball β€” Official Baseball Rules, Rule 9: StatisticsUSA
  2. Society for American Baseball Research β€” Statistical Analysis CommitteeUSA
  3. National Collegiate Athletic Association β€” Baseball Statisticians' ManualUSA
  4. Numora Editorial Policy. numora.net/editorial-policy