Batting Average Calculator

AVG, OBP, and SLG from hits, at-bats, walks, and power.

Sports and PaceUpdated 2026-10-101 min read
Batting Average Calculator
Walks and sacrifices are not at-bats.
Batting average
...
On-base %...
Slugging...

What it does

Baseball compresses hitting into three decimals: average for hit rate, on-base for reaching safely by any means, and slugging for power per at-bat. Together they describe contact, patience, and punch better than any one alone.

The tool above takes hits, at-bats, extra base splits, walks, hit by pitches, and sacrifice flies. It returns AVG, OBP, and SLG in classic dot three hundred style.

The default of 150 hits in 500 at-bats with 30 doubles, 5 triples, 20 homers, 60 walks, 5 hit batters, and 4 sac flies reads .300 / .378 / .500: a strong all around line near star level.

Formulas follow the official MLB glossary (AVG = H/AB, SLG from total bases) with ESPN stat references matching OBP. Both exclude walks from at-bats while counting them in on-base chances.

How to use

  1. Enter hits and at-bats first.
  2. Split extra base hits into doubles, triples, homers.
  3. Add walks, hit by pitches, and sac flies.
  4. Read AVG first for pure hit rate.
  5. Read OBP and SLG for patience and power.

Formula

AVG = H/AB. TB = 1B + 2x2B + 3x3B + 4xHR. SLG = TB/AB. OBP = (H+BB+HBP)/(AB+BB+HBP+SF).
AB
At-bats: plate trips minus walks, HBP, sacrifices.
TB
Total bases weighting each hit by bags.
OBP
Safe arrival rate across all chances.

Extra base hits cannot pass total hits; the page rejects such splits. Display drops the leading zero by baseball custom (.300, never 0.300).

Worked example

Example: 150 for 500 with power and patience

Defaults: 150 H, 500 AB, 30 2B, 5 3B, 20 HR, 60 BB, 5 HBP, 4 SF.

  1. AVG: 150 / 500 = .300.
  2. Singles: 150 - 30 - 5 - 20 = 95.
  3. Bases: 95 + 60 + 15 + 80 = 250. SLG 250/500 = .500.
  4. OBP: (150+60+5)/(500+60+5+4) = 215/569 = .378.
  5. Tool shows .300, .378, .500.

Reference table

What the numbers mean
LineReads asLevel
.200 / .280 / .350Bench batBelow average
.250 / .320 / .400League average zoneAverage
.300 / .378 / .500Example hereStar
.350 / .450 / .650MVP chaseElite

Limits

  • Rate stats only; playing time and defense sit outside.
  • Small samples swing wildly; hundreds of trips stabilize.
  • Park and era shift meaning across seasons.
  • Walks counted in OBP but never in AVG by rule.

Common mistakes

  • Dividing by plate appearances instead of at-bats.
  • Counting walks as hits or at-bats.
  • Reading SLG as a percent instead of bases per at-bat.
  • Comparing across eras without adjusting.
  • Trusting April splits as true talent.

Try it yourself

Quick checks. Answers sit tucked under each question.

1 for 4, nothing else?

AVG .250, OBP .250, SLG .250.

0 for 4 with 2 walks?

AVG .000 with OBP 2/6 = .333.

2 homers in 4 at-bats?

AVG .500 with SLG 8/4 = 2.000.

Questions

How do you calculate batting average?

Hits divided by at-bats: 150/500 = .300.

Do walks count?

In OBP only, never in AVG or at-bats.

What is slugging?

Total bases per at-bat: homers count 4, triples 3, doubles 2.

What is a good line?

Near .250/.320/.400 is average; .300/.380/.500 stars.

Why no leading zero?

Baseball custom prints .300, a tradition every scoreboard follows.

AVG vs OBP?

AVG measures hits; OBP adds walks and hit batters for full arrival rate.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.