Batting Average Calculator
Work out a batting average, on-base percentage, slugging percentage and OPS from at bats, hits, walks and extra-base hits, by rule 9.21 of the Official Baseball Rules.
Result
Batting average: 0.300
Rates are shown to three decimal places, the way box scores print them; OPS adds the unrounded rates.
- On-base percentage
- 0.377
- Slugging percentage
- 0.522
- On-base plus slugging (OPS)
- 0.899
- Total bases
- 261
- Singles
- 92
https://calcgallery.com/sports/batting-average-calculator/
Results are exact arithmetic on the numbers you enter, following the rule or formula the page names. Official records are kept by the league, federation or association concerned, and their figures and rulings control. Read the full disclaimer
How to use the Batting Average Calculator
- Enter the batting line as the scorer kept it, at bats, hits, doubles, triples and home runs.
- Add walks, hit by pitch and sacrifice flies for on-base percentage. Leave them at zero if you only want the batting average.
- Read the batting average, on-base percentage, slugging percentage and OPS, each to three decimal places.
The four rates
Rule 9.21 of the Official Baseball Rules defines each rate by what it divides:
AVG = hits ÷ at batsSLG = total bases ÷ at batsOBP = (hits + walks + hit by pitch) ÷ (at bats + walks + hit by pitch + sacrifice flies)OPS = OBP + SLG
Total bases are singles + 2 × doubles + 3 × triples + 4 × home runs. The rates are not rounded until they are shown, so OPS is the sum of the full rates rather than of the three-decimal figures, and can differ from adding the printed numbers by a thousandth.
What counts as an at bat
At bats are not the same as trips to the plate. Rule 9.02(a)(1) leaves out a walk, a hit by pitch, a sacrifice bunt or fly, and first base awarded for interference or obstruction. That is why the page asks for walks, hit by pitch and sacrifice flies separately: they change on-base percentage and nothing else.
Impossible lines
The page refuses a line that cannot happen, such as more hits than at bats or more extra-base hits than hits, rather than returning a rate from it. With no at bats there is no batting average to give, because the rule divides by zero.
With your numbers
- Singles = 150 − 30 − 3 − 25 = 92
- Total bases = 92 + 2 × 30 + 3 × 3 + 4 × 25 = 261
- AVG = 150 ÷ 500 = 0.300
- OBP = (150 + 60 + 5) ÷ (500 + 60 + 5 + 5) = 0.377
- SLG = 261 ÷ 500 = 0.522
- OPS = OBP + SLG = 0.899
Quick reference
Rates are shown to three decimal places, the way box scores print them; OPS adds the unrounded rates.
| Example | Batting average |
|---|---|
| 150 for 500, 30 doubles, 3 triples, 25 home runs, 60 walks | 0.300 |
| 4 for 10, all singles | 0.400 |
| A single, double, triple and home run in 4 at bats | 1.000 |
| 1 for 3 with a walk, a hit by pitch and a sacrifice fly | 0.333 |
| 0 for 4 | 0.000 |
| 180 for 600, 40 doubles, 45 home runs, 100 walks | 0.300 |
Common questions about the Batting Average Calculator
- Why is on-base percentage not just hits plus walks divided by plate appearances?
- Rule 9.21(f) divides by at bats, walks, hit by pitch and sacrifice flies only. Sacrifice bunts and times awarded first base on interference, obstruction or a shift violation are left out of both the top and the bottom, so the denominator is usually a little smaller than plate appearances.
- Does a sacrifice fly lower a batting average?
- No. A sacrifice fly is not a time at bat under rule 9.02(a)(1), so batting average and slugging ignore it. It does count against on-base percentage, which is why a player can have a higher batting average than the other rates suggest.
- Why does a batting average have three decimal places?
- It is a fraction of at bats written the way box scores print it, to the thousandth. A .300 hitter has three hits in every ten at bats. The leading zero is dropped in baseball writing; the page keeps it so the number reads the same in every language.
- What is OPS?
- On-base percentage plus slugging percentage, added as unrounded rates. It combines how often a batter reaches base with how many bases the hits are worth. Because the two rates have different denominators, OPS is a convenient summary rather than a rate of anything.
- Where do total bases come from?
- A single is one base, a double two, a triple three and a home run four. The page works out singles as hits minus doubles, triples and home runs, then adds up the bases. Slugging percentage is total bases divided by at bats, so it can exceed 1.000.