Baseball Stats Calculator

Calculate batting average, on-base percentage, slugging percentage, and OPS from at-bats, hits, walks, and home runs.
Get a full offensive stat breakdown.

Batting Statistics

Baseball batting statistics quantify a hitter’s performance using several complementary metrics. Batting Average (AVG), On-Base Percentage (OBP) and Slugging Percentage (SLG) are the three core statistics, and adding the last two together gives OPS, which is about as much as any single number can tell you about a hitter.

Batting Average (AVG): AVG = Hits ÷ At-Bats

On-Base Percentage (OBP): OBP = (Hits + Walks + Hit by Pitch) ÷ (At-Bats + Walks + Hit by Pitch + Sacrifice Flies)

Slugging Percentage (SLG): SLG = Total Bases ÷ At-Bats Where Total Bases = (1B × 1) + (2B × 2) + (3B × 3) + (HR × 4)

OPS (On-base Plus Slugging): OPS = OBP + SLG

Where:

  • H = total hits; BB = walks (base on balls); HBP = hit by pitch; SF = sacrifice flies
  • AB = at-bats (plate appearances minus walks, HBP, sacrifices)
  • 1B, 2B, 3B, HR = singles, doubles, triples, home runs

OPS performance scale:

  • Below .650: Poor
  • .650–.699: Below average
  • .700–.749: Average
  • .750–.799: Above average
  • .800–.849: Good
  • .850–.899: Great
  • .900–.999: Excellent
  • 1.000+: Elite (all-time great season)

Worked example: Player stats for a season: 520 AB, 158 H, 30 2B, 5 3B, 22 HR, 65 BB, 4 HBP, 3 SF.

  • Singles = 158 − 30 − 5 − 22 = 101
  • Total Bases = (101×1) + (30×2) + (5×3) + (22×4) = 101 + 60 + 15 + 88 = 264
  • AVG = 158 ÷ 520 = .304
  • OBP = (158 + 65 + 4) ÷ (520 + 65 + 4 + 3) = 227 ÷ 592 = .383
  • SLG = 264 ÷ 520 = .508
  • OPS = .383 + .508 = .891: a great season by any measure.

What OPS gets wrong

Adding a rate whose denominator is plate appearances to one whose denominator is at-bats is not defensible arithmetic, and OPS survives anyway because it predicts run scoring better than anything else this easy to work out in your head. Two things it does badly are worth knowing.

It undervalues getting on base. A point of OBP is worth close to twice a point of SLG in actual runs, and OPS weights them equally, so a patient singles hitter reads lower than he plays. That gap is why OPS+ and wOBA exist.

It also ignores park and era completely. A .891 in Coors Field is not a .891 in Petco, and a .891 in 1968 would have led the league while the same number in 2000 was ordinary. Any number here is a starting point for a comparison, not the comparison itself.

Everything here is a hitter’s line. The pitching equivalents, FIP, WHIP, ERA+, K/9 and BB/9, are on the baseball advanced stats calculator.

A note on at-bats versus plate appearances. A walk is not an at-bat, which is why batting average ignores walks entirely and on-base percentage does not. That single distinction is most of the argument in baseball statistics for the last forty years: whether a walk is a failure to hit or a job done.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.