Toolvito

Works on this device

Baseball Batting Average Calculator

Enter hits and at-bats to get a batting average, written the way baseball writes it. Add doubles, triples, home runs, walks, hit by pitch and sacrifice flies for on-base percentage, slugging and OPS.

Enter your values

Batting average is hits divided by at-bats.

Your values

All hits: singles, doubles, triples and home runs.

Walks, hit by pitch, sacrifice bunts and sacrifice flies are not at-bats.

More options

This is off unless you turn it on. Saved entries stay in this browser only. Untick the box to delete them.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

How to use this calculator

  1. Choose what you want to work out. Batting average from hits and at-bats needs only two numbers.
  2. Enter the counting numbers of the batter. At-bats do not include walks, hit by pitch, sacrifice bunts or sacrifice flies.
  3. Choose Calculate. Under More options you can show the averages as 0.300 in place of .300.
  4. Choose Hits needed to reach a target average to see how many hits you need in the at-bats still to come.
  5. Choose Game log to keep one row for each game. Tick Save my entries on this device to keep the log in this browser.

The formulas

These are the definitions of the Official Baseball Rules. Softball uses the same ones. Each figure is worked out as an exact fraction and rounded once to three decimals. A fourth decimal of 5 or more rounds up, so 0.2995 shows as .300.

  • Batting average (AVG) = hits ÷ at-bats.
  • On-base percentage (OBP) = (hits + walks + hit by pitch) ÷ (at-bats + walks + hit by pitch + sacrifice flies).
  • Total bases (TB) = singles + 2 × doubles + 3 × triples + 4 × home runs. Singles are the hits that are not doubles, triples or home runs.
  • Slugging percentage (SLG) = total bases ÷ at-bats.
  • On-base plus slugging (OPS) = OBP + SLG.
  • Hits needed for a target: the smallest whole number x with (hits + x) ÷ (at-bats + at-bats to come) at or above the target.

Worked example

A batter has 150 hits in 500 at-bats. The batting average is 150 ÷ 500 = .300.

The 150 hits hold 30 doubles, 5 triples and 20 home runs, so 95 are singles. Total bases are 95 + 2 × 30 + 3 × 5 + 4 × 20 = 250, and slugging is 250 ÷ 500 = .500.

With 60 walks, 5 times hit by pitch and 5 sacrifice flies, the on-base percentage is (150 + 60 + 5) ÷ (500 + 60 + 5 + 5) = 215 ÷ 570 = .377. OPS is .377 + .500 = .877.

To finish at .310 or better after 50 more at-bats, the batter needs 0.310 × 550 − 150 = 20.5, so 21 hits. The average is then 171 ÷ 550 = .311.

Limits you should know

  • The tool does not hold the numbers of any player, team or league, and it does not look anything up. You type the numbers.
  • Whether a play is a hit, an error or a sacrifice is a decision of the official scorer. The rules of your league decide what counts.
  • A league can ask for a least number of plate appearances before a batter counts for a batting title. That rule is not built in.
  • An average from a few at-bats changes fast. One hit in four at-bats is .250, and two hits are .500.
  • For cricket, a batting average is runs divided by the times out. Use the Cricket Run Rate Calculator for that.
  • The game log stays in this page on your device and is not sent anywhere. Up to 400 games fit in one log.

Related tools