Skip to content

Baseball · Calculator

Batting stats calculator: AVG, OBP, SLG, OPS, ISO and BABIP

Batting average, on-base percentage and slugging percentage are defined in Rule 9.21 of MLB’s Official Baseball Rules, and each measures something different: hits per at-bat, times on base per opportunity, and bases per at-bat. OPS adds the last two, isolated power subtracts average from slugging to leave only extra bases, and BABIP looks only at balls put in play.

Enter a hitter’s counting statistics once to get all six, with the totals each one is built from shown alongside. Strikeouts are only needed for BABIP.

By Reign Creative LLCPublished More in the Baseball hub

Calculate batting stats

Hits include doubles, triples and home runs. Enter 0 for anything that does not apply.

Sacrifice bunts are left out entirely.

Only needed for BABIP. Leave empty to skip it.

Slash line (AVG/OBP/SLG).300/.375/.518

Batting average (AVG)
.300
On-base percentage (OBP)
.375
Slugging percentage (SLG)
.518
On-base plus slugging (OPS)
.893
Isolated power (ISO)
.218
BABIP
.323

311 total bases from 112 singles and the extra-base hits. On base 255 times in 680 opportunities counted by Rule 9.21(f).

The formulas

The first three come straight from Rule 9.21 of the Official Baseball Rules; OPS, isolated power and BABIP are built from the same counts, as MLB’s glossary defines them.

Batting average

AVG = hits ÷ at-bats

On-base percentage

OBP = (H + BB + HBP) ÷ (AB + BB + HBP + SF)

Slugging percentage

SLG = total bases ÷ at-bats, where TB = 1B + 2×2B + 3×3B + 4×HR

On-base plus slugging

OPS = OBP + SLG

Isolated power

ISO = SLG − AVG = (2B + 2×3B + 3×HR) ÷ AB

Batting average on balls in play

BABIP = (H − HR) ÷ (AB − K − HR + SF)

Walks, hit-by-pitches and sacrifice flies are not at-bats, which is why they appear in on-base percentage and nowhere in batting average or slugging. Sacrifice bunts are left out of every one of these numbers.

Worked example

Take an illustrative season — not a real player — of 600 at-bats with 180 hits (35 doubles, 3 triples, 30 home runs), 70 walks, 5 hit-by-pitches, 5 sacrifice flies and 110 strikeouts. That leaves 112 singles and 311 total bases.

Rate statistics for the illustrative season
StatisticCalculationResult
AVG180 ÷ 600.300
OBP255 ÷ 680.375
SLG311 ÷ 600.518
OPS.375 + .518.893
ISO.518 − .300.218
BABIP150 ÷ 465.323

The same 180 hits produce quite different pictures: a .300 average, a better on-base percentage because of the walks, a slugging percentage pulled up by the extra-base hits, and a BABIP that sets the home runs and strikeouts aside entirely.

What these numbers do not tell you

  • Where the games were played. None of these rates adjusts for ballpark or for the league’s scoring level that season, so they compare players best within the same context.
  • How the hitter made outs. A strikeout and a deep fly ball count the same in batting average.
  • How reliable a small sample is. Over a few dozen at-bats, a handful of hits moves every rate a long way — BABIP most of all, because it rests on the smallest count.
  • OPS precision. It adds two rates with different denominators, so it is a convenient shorthand rather than a measured weighting of getting on base against hitting for power.

The OPS and slugging explainer goes further into what OPS captures, and baseball stats explained for beginners covers the rest of the stat line.

In Baseball Career Sim 2026 the season record keeps hits, home runs, batting average, on-base percentage and slugging for the player you create, and they roll up into career totals.

Reign Creative LLC makes Baseball Career Sim 2026, so we have a commercial interest in it. It is not affiliated with, or endorsed by, any league, team, players’ association or athlete.

Good to know

Frequently asked questions

Are walks counted in batting average?
No. A walk is not an at-bat, so it changes neither the top nor the bottom of batting average. Walks do count in on-base percentage, which adds walks and hit-by-pitches to times on base — which is why a patient hitter can have a modest average and a strong on-base percentage.
Do sacrifice flies count as at-bats?
No. A sacrifice fly is not an at-bat, so it does not affect batting average or slugging, but Rule 9.21(f) includes sacrifice flies in the denominator of on-base percentage — which is why a sacrifice fly lowers on-base percentage slightly.
Does reaching base on an error count toward OBP?
No. Times on base from errors, fielder’s choices and dropped third strikes are not counted, and Rule 9.21(f) tells scorers to ignore a batter awarded first base for interference, obstruction or a shift-restriction violation.
What is BABIP?
Batting average on balls in play: hits other than home runs, divided by at-bats minus strikeouts minus home runs plus sacrifice flies. It removes the outcomes the defence has no part in. MLB’s glossary gives the example of a 2-for-5 day with a home run and a strikeout — 1-for-3 on balls in play, a BABIP of .333.
Is OPS a precise measure?
It is a convenient shorthand. OPS adds two rates with different denominators, so it weights reaching base and hitting for power by convenience rather than by design. The OPS and slugging explainer covers what it captures and what it misses.

Sources

  1. Official Baseball Rules, 2026 Edition — Rule 9.21, Determining Percentage Records (opens in a new tab)Major League Baseball — accessed
  2. Batting Average (AVG) (opens in a new tab)MLB.com Glossary — accessed
  3. On-base Percentage (OBP) (opens in a new tab)MLB.com Glossary — accessed
  4. Slugging Percentage (SLG) (opens in a new tab)MLB.com Glossary — accessed
  5. On-base Plus Slugging (OPS) (opens in a new tab)MLB.com Glossary — accessed
  6. Isolated Power (ISO) (opens in a new tab)MLB.com Glossary — accessed
  7. Batting Average on Balls in Play (BABIP) (opens in a new tab)MLB.com Glossary — accessed

League, governing-body and team names appear here only to identify the formulas and rules being used. Reign Creative LLC's sports games and calculators are not affiliated with, endorsed by or licensed by any league, team, players' association or athlete, and all names and marks belong to their owners.

All sports calculators