How to calculate batting average
Count hits: singles, doubles, triples, and home runs all count as one hit each. Count official at-bats: plate appearances minus walks, hit by pitch, sacrifices, and catcher interference. Divide hits by at-bats and round to three decimals.
Baseball drops the leading zero, so 0.307 is written .307 and said "three-oh-seven". A perfect 1.000 keeps its one.
Why one at-bat moves a small sample so much
Early in a season, every at-bat is a big share of the total. The calculator shows what the next hit and the next out would do, which is a useful way to explain a slump or a hot streak to a young hitter and their family.
Questions
Do walks count in batting average?
No. A walk is not an at-bat, so it changes neither the top nor the bottom of the fraction. On-base percentage is the stat that credits walks.
Does reaching on an error count as a hit?
No. Reaching on an error is an at-bat without a hit, so it lowers batting average.
Is the formula the same in softball?
Yes. Hits divided by at-bats, the same in baseball and softball.
Is my data stored?
No. The math runs in your browser and nothing you type is sent anywhere or put in analytics.
Sources
Formulas and rules checked against these sources on October 28, 2026. Leagues and associations change their rules, so when your league's rulebook differs, follow your league.