The formula
Batting average is the share of a hitter’s at-bats that end in a hit. It runs from .000 to 1.000 and is written to three decimals. MLB’s glossary calls it one of the oldest and most universal tools for measuring a hitter’s success at the plate.
The only part that needs care is the denominator. An at-bat is a plate appearance that ends in a hit, an out, an error or a fielder’s choice. These plate appearances are not at-bats:
- walks, intentional or not
- hit-by-pitches
- sacrifice bunts and sacrifice flies
- catcher’s interference
So a hitter who goes 1 for 3 with a walk has four plate appearances, three at-bats and a .333 day.
Worked example
The default inputs are a full season: 152 hits in 540 at-bats.
- 152 ÷ 540 = 0.28148, written .281
- That is one hit every 3.55 at-bats
- The 2026 MLB average was .244, so this hitter is 38 points above the league
Chasing .300. With 60 at-bats still to come, the season will end at 600 at-bats. A .300 average needs 0.300 × 600 = 180 hits. The hitter has 152, so he needs 28 hits in the last 60 at-bats, a .467 pace. Possible for two hot weeks, but unlikely. The same sum explains why averages are hard to move late in a season: every at-bat already in the book has to be outweighed.
Next game. The table on the page shows the effect of one game. From 152 for 540, an 0-for-4 drops the average two points to .279 and a 4-for-4 lifts it to .287. In April, at 10 for 40, the same two games would mean .227 or .318.
Reading the result
The comparison bar sets the average against the MLB figure for the latest full season: 39,849 hits in 163,329 at-bats across all 30 teams in 2026, which is .244. The ranking below it adds a few well-known seasons, all reproduced from the hits and at-bats MLB lists:
| Season | Hits | At-bats | AVG |
|---|---|---|---|
| Ted Williams, 1941 | 185 | 456 | .406 |
| Barry Bonds, 2004 | 135 | 373 | .362 |
| Luis Arraez, 2023 | 203 | 574 | .354 |
| Aaron Judge, 2022 | 177 | 570 | .311 |
| Shohei Ohtani, 2024 | 197 | 636 | .310 |
League averages have fallen as strikeouts have risen. Compare a hitter with the league and season he played in before comparing him with the past.
Small samples
Batting average is noisy. A hitter with a true talent of .270 will have 50-at-bat stretches at .180 and at .360 through chance alone. That is why the verdict adds a warning under 50 at-bats.
| At-bats so far | What one extra hit adds for a .270 hitter |
|---|---|
| 10 | about 65 points |
| 50 | about 14 points |
| 200 | about 4 points |
| 540 | about 1 point |
A weekend line of 5 for 12 is a .417 average, and it tells you almost nothing about the hitter. A season of 540 at-bats tells you a lot.
What batting average leaves out
Batting average treats every hit alike and ignores every walk. Two hitters at .280 can be very different players.
- Walks and hit-by-pitches. A hitter who walks 100 times reaches base far more often than one who walks 20 times, at the same average. On-base percentage counts them.
- Power. A single and a home run are each one hit. Slugging percentage weights hits by bases.
- Both together. OPS adds on-base and slugging and is the quickest single number for overall hitting.
The 2004 season in the table above is the clearest case. A .362 average was the smallest part of it: with 232 walks the on-base percentage was .609.
Pitchers and batting average against
The same formula describes pitchers from the other side. Batting average against is hits allowed divided by at-bats against. It is useful for splits, such as how a pitcher does against left-handed and right-handed hitters, where ERA cannot be divided up.
Softball, youth leagues and scorekeeping
The formula is the same at every level. What changes is the scoring, and that is where averages in local leagues drift apart.
- Score errors honestly. A ball that an average fielder at your level would handle is an error and not a hit, even if it was hit hard.
- A batter who reaches because the defence chose to retire another runner is charged with an at-bat and no hit.
- A sacrifice fly needs a runner to score on the catch. A fly ball that only moves a runner from second to third is an ordinary out and an at-bat.
Keep at-bats and plate appearances in separate columns of the scorebook. Most wrong averages come from counting walks as at-bats.
Frequently asked questions
How do you calculate batting average?
Does a walk count against your batting average?
What is a good batting average?
Does reaching base on an error count as a hit?
How many hits do I need to bat .300?
Who was the last player to hit .400?
Why is batting average shown without a zero in front?
Sources
Embed this calculator
Free for clubs, coaches, schools and blogs. Copy the code below; it stays up to date by itself.