Batting Average Calculator

Enter hits, at-bats, walks, and extra-base hits to instantly compute batting average, OBP, slugging percentage, and OPS.

Batter Stats

For OBP (optional)

For Slugging % (optional)

Quick Examples

Enter stats on the left to see results

Formulas Used

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

Singles (1B) are derived as H − 2B − 3B − HR. OBP and SLG are shown as “N/A” when the optional fields are not filled in.

Copied!

Summary

Enter hits, at-bats, walks, and extra-base hits to instantly compute batting average, OBP, slugging percentage, and OPS.

How it works

  1. Enter the batter's total hits (H) and at-bats (AB) for the period you want to analyze.
  2. Add walks (BB) and hit-by-pitches (HBP) to enable OBP calculation.
  3. Enter extra-base hit counts (doubles, triples, home runs) to enable slugging percentage.
  4. The calculator applies the official MLB formulas: BA = H/AB, OBP = (H+BB+HBP)/(AB+BB+HBP+SF), SLG = Total Bases/AB.
  5. Sacrifice flies (SF) are optional but improve OBP accuracy when provided.
  6. Click Calculate to see all four stats alongside quality ratings.

Use cases

Frequently Asked Questions

Related tools

Last updated: 2026-05-29 · Reviewed by Nham Vu