About the Batting Average Calculator
This batting average calculator turns a hitter’s raw counting stats into the rate stats used on every baseball and softball scoreboard. Enter at-bats and hits for a simple batting average, or add doubles, triples, home runs, walks, hit-by-pitches, sacrifice flies and strikeouts to get on-base percentage (OBP), slugging percentage (SLG), OPS, isolated power (ISO) and batting average on balls in play (BABIP).
It is handy for coaches keeping a scorebook, parents tracking a Little League season, fantasy players checking a hot streak, and players logging their own games. The familiar “slash line” (AVG/OBP/SLG) is produced in the standard three-decimal format, such as .300/.377/.522.
The formulas are the official Major League Baseball definitions, so results match MLB and most amateur leagues. Remember that walks, hit-by-pitches and sacrifices are not at-bats: enter only official at-bats in the first box.
With the default inputs, the batting average (avg) is 0.3. Change any value above to recalculate instantly.
How to use the batting average calculator
- 1Enter official at-bats and total hits for batting average.
- 2Add doubles, triples and home runs to get slugging and ISO.
- 3Add walks, hit-by-pitches and sacrifice flies for on-base percentage.
- 4Enter strikeouts if you want BABIP.
- 5Read the slash line and OPS, and use the table to see how each was calculated.
Formula and method
Batting average divides hits by official at-bats. On-base percentage counts every way of reaching base except errors and fielder’s choices, divided by at-bats plus walks, hit-by-pitches and sacrifice flies (sacrifice bunts are excluded). Slugging percentage weights each hit by the bases it earns — singles 1, doubles 2, triples 3, home runs 4 — and divides total bases by at-bats.
OPS simply adds OBP and SLG as a quick all-round measure. Isolated power (SLG − AVG) shows extra-base power only, and BABIP measures how often balls put in play (excluding home runs) fall for hits; league-wide it usually sits near .300. Singles are derived as hits minus doubles, triples and home runs.
- AB
- Official at-bats
- H
- Hits (1B + 2B + 3B + HR)
- BB / HBP
- Walks / times hit by a pitch
- SF
- Sacrifice flies
- TB
- Total bases
- K
- Strikeouts
Worked examples
A strong full season
150 hits in 500 at-bats is a .300 average. The hitter reached base 215 times in 570 OBP opportunities (.377), and 92 singles, 30 doubles, 3 triples and 25 homers make 261 total bases, a .522 slugging percentage and .899 OPS.
One game: 2-for-4 with a double and a walk
Two hits in four at-bats is .500. Adding the walk, the hitter reached base 3 times in 5 plate appearances (.600). A single and a double are 3 total bases in 4 at-bats, a .750 slugging percentage.
Power hitter with a lower average
A .276 average hides big power: 38 home runs push total bases to 310 and slugging to .534, for an ISO of .259. A BABIP of .307 is close to normal, so the average looks sustainable.
Frequently asked questions
How do you calculate batting average?+
Divide hits by official at-bats and round to three decimals. For example, 45 hits in 150 at-bats is 45 ÷ 150 = .300. Walks, hit-by-pitches and sacrifices do not count as at-bats.
What is a good batting average?+
In Major League Baseball a .300 average is traditionally considered excellent and the league average in recent seasons has been around .240–.250. Youth and amateur leagues usually run much higher.
What is the difference between OBP and batting average?+
Batting average only counts hits. On-base percentage also credits walks and hit-by-pitches, so it better reflects how often a hitter avoids making an out. Sacrifice flies are included in the OBP denominator.
What is a good OPS?+
An OPS of .800 or higher is generally regarded as very good at the major-league level, and .900+ is star territory. Around .700–.730 has been close to league average in recent MLB seasons.
Do sacrifice bunts count as at-bats?+
No. Sacrifice bunts and sacrifice flies are not at-bats, so they do not lower batting average. Sacrifice flies are counted in the OBP denominator, but sacrifice bunts are not counted anywhere in OBP.
What is BABIP?+
Batting average on balls in play measures how often non-home-run balls in play become hits: (H − HR) ÷ (AB − K − HR + SF). It usually hovers around .300, so very high or low values often signal luck.