Everyday math calculator

Batting average calculator

Enter hits and at-bats for batting average. Add the optional stats for OBP, slugging and OPS.

How to calculate batting average

Batting average = hits ÷ at-bats, shown to three decimals. OBP = (hits + walks + hit by pitch) ÷ (at-bats + walks + hit by pitch + sacrifice flies). Slugging = total bases ÷ at-bats. OPS = OBP + slugging.

Worked example

45 hits in 150 at-bats is 45 ÷ 150 = .300.

Assumptions and limits

At-bats do not include walks, hit by pitch or sacrifices. Doubles, triples and home runs are already part of the hit total. Softball uses the same batting average formula.

Batting average examples

HitsAt-batsAverage
14.250
310.300
25100.250
45150.300
60200.300
175550.318

Common mistakes to avoid

  • Counting walks as at-bats. Walks, hit by pitch and sacrifices are not at-bats.
  • Adding doubles, triples and home runs on top of hits. They are already part of the hit total.
  • Showing too few decimals. Batting averages are normally written to three decimal places, such as .300.

Privacy

Values are processed in your browser and are not sent to Earnwell Atlas. Your host may still record standard visit logs.

Frequently asked questions

How do you calculate a batting average?

Divide hits by at-bats and show the result to three decimal places. 45 hits in 150 at-bats is 45 ÷ 150 = .300.

Do walks count as at-bats?

No. Walks, hit by pitch, sacrifice bunts and sacrifice flies are not at-bats, so they do not lower a batting average. Walks and hit by pitch do count toward on-base percentage.

What is a good batting average?

In professional baseball, around .250 is roughly average and .300 or higher is considered excellent. Youth, high school and softball levels often see higher averages.

Is batting average the same as on-base percentage?

No. On-base percentage also counts walks and hit by pitch, so it is usually higher.

Built and maintained by Faris Dinware, founder of Earnwell Atlas. Last updated 29 November 2026. How we build and check these tools.