How to use this calculator
- Enter or choose hits (H).
- Enter or choose at-bats (AB).
- Enter or choose doubles (2B).
- Enter or choose triples (3B).
- Enter or choose home runs (HR).
- 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
- AVG = 150 ÷ 500 = .300.
- OBP = (150 + 60 + 5) ÷ (500 + 60 + 5 + 5) = 215 ÷ 570 = .377.
- Singles = 150 − 30 − 3 − 20 = 97; total bases = 97 + 60 + 9 + 80 = 246; SLG = 246 ÷ 500 = .492.
- 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.