Baseball stats calculator

Choose batting or pitching and enter the counts from the box score or season line. For a hitter you get batting average, on-base percentage, slugging percentage, OPS and isolated power; for a pitcher, ERA, WHIP and the per-nine-inning rates. Innings are written as in box scores: 180.1 means 180 and one third.

Stats for
Batting average (AVG).300
On-base percentage (OBP).377
Slugging percentage (SLG).522
OPS (OBP + SLG).899
Isolated power (ISO)
.222
Total bases (TB)
261
Plate appearances counted (AB + BB + HBP + SF)
570

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose batting or pitching.
  2. Enter the counts. For a hitter, doubles, triples and home runs are part of the hits.
  3. For a pitcher, write innings as in a box score: 6.2 for six and two thirds.
  4. Read the rates; batting rates are shown in the usual three-decimal style.

The formulas

  • AVG = H ÷ AB
  • OBP = (H + BB + HBP) ÷ (AB + BB + HBP + SF)
  • SLG = TB ÷ AB, with TB = singles + 2 × 2B + 3 × 3B + 4 × HR
  • OPS = OBP + SLG; ISO = SLG − AVG
  • ERA = 9 × ER ÷ IP; WHIP = (BB + H) ÷ IP; K/9 = 9 × K ÷ IP; K/BB = K ÷ BB

Worked example

500 AB, 150 H (30 doubles, 3 triples, 25 home runs), 60 BB, 5 HBP, 5 SF:

  • singles = 150 − 30 − 3 − 25 = 92; TB = 92 + 60 + 9 + 100 = 261;
  • AVG = 150 ÷ 500 = .300; OBP = 215 ÷ 570 = .377; SLG = 261 ÷ 500 = .522;
  • OPS = .899; ISO = .522 − .300 = .222.

Tips

  • Sacrifice bunts are left out of OBP, as in the official definition; only sacrifice flies count.
  • Compare rates only over enough plate appearances: a few games can swing them a lot.
  • League averages change from season to season, so compare a player with his league and year.

Frequently asked questions

How is batting average calculated?

Hits divided by at bats. 150 hits in 500 at bats is .300. Walks, hit-by-pitches and sacrifice flies are not at bats, so they do not change the average.

What is a good OPS?

OPS adds on-base percentage and slugging percentage. As a rough guide in professional baseball, about .700 to .750 is ordinary, above .800 is very good and above .900 is excellent. The example hitter has .377 + .522 = .899.

How is ERA calculated?

ERA = 9 × earned runs ÷ innings pitched: the earned runs allowed per nine innings. 60 earned runs in 180⅓ innings is 9 × 60 ÷ 180.333 = 2.99.

Why does 180.1 innings mean 180⅓?

An inning has three outs, so box scores write each extra out after the point: .1 is one out and .2 is two. The calculator reads 180.1 as 180⅓ (541 outs), not as 180.1.

What is WHIP?

Walks plus hits per inning pitched: (BB + H) ÷ IP. It shows how many runners a pitcher allows; around 1.10 to 1.20 is very good in professional baseball. The example pitcher has 210 ÷ 180.333 = 1.16.

More in Hobbies

All tools in this category: Hobbies ·Updated November 4, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.