Baseball Batting Average Calculator

Batting average is hits divided by at-bats, shown to three decimals (.300). Add walks, hit-by-pitches, sacrifice flies and extra-base hits to get OBP, SLG and OPS too.

Also called: AVG calculator · OPS calculator · Softball batting average calculator

  • Last updated
  • Formula tested against reference values

Your numbers

Plate appearances minus walks, hit-by-pitches, sacrifices and interference.

Result

Batting average (AVG)
—

Calculating…

On-base percentage (OBP)
—
Slugging percentage (SLG)
—
OPS (OBP + SLG)
—
Total bases
—

How to use this calculator

  1. Enter or choose hits (H).
  2. Enter or choose at-bats (AB).
  3. Enter or choose doubles (2B).
  4. Enter or choose triples (3B).
  5. Enter or choose home runs (HR).
  6. The batting average (AVG) updates as you type. Use Copy result or Share to keep it.

Method

AVG = H ÷ AB; OBP = (H + BB + HBP) ÷ (AB + BB + HBP + SF); SLG = (1B + 2×2B + 3×3B + 4×HR) ÷ AB; OPS = OBP + SLG

1B
singles = H − 2B − 3B − HR
AB
official at-bats
BB, HBP, SF
walks, hit-by-pitches and sacrifice flies

Worked example

  1. AVG = 150 ÷ 500 = .300.
  2. OBP = (150 + 60 + 5) ÷ (500 + 60 + 5 + 5) = 215 ÷ 570 = .377.
  3. Singles = 150 − 30 − 3 − 20 = 97; total bases = 97 + 60 + 9 + 80 = 246; SLG = 246 ÷ 500 = .492.
  4. OPS = .3772 + .4920 = .869.

A 150-for-500 season with 30 doubles, 3 triples and 20 home runs is a .300/.377/.492 slash line with an .869 OPS.

What the result means

AVG counts every hit the same and ignores walks. OBP shows how often a batter avoids making an out, and SLG how much damage each hit does, which is why OPS is a better single summary.

Assumptions and limits

  • Definitions follow MLB’s official statistics; reaching on an error or fielder’s choice is not a hit or a time on base.
  • Sacrifice bunts are excluded from at-bats and OBP, as in the official definitions.

Questions

Why is batting average written without a leading zero?

It is a convention: .300 is read “three hundred” and means 30% of at-bats ended in a hit.

Do walks count as at-bats?

No. Walks, hit-by-pitches, sacrifice flies and sacrifice bunts are plate appearances but not at-bats, so they do not lower a batting average.

Sources