Batting Average Calculator
Free batting average calculator: enter hits and at-bats to get AVG to three decimals (.300 style), plus on-base percentage from walks, HBP and sacrifice flies.
Updated 2026-06-09 · Free · No sign-up · Runs privately in your browser
2B, 3B and HR are counted inside Hits and are used for SLG/OPS. Remaining hits are treated as singles.
What is a batting average calculator?
A batting average calculator turns a batter’s hits and at-bats into the familiar three-decimal number that baseball and softball use to measure hitting, such as .300 or .275. You enter how many hits a player recorded and how many at-bats they had, and the tool divides the two and formats the result the way a scorebook does — without a leading zero and rounded to three places. If you also know the player’s walks, hit-by-pitch and sacrifice flies, the same tool computes on-base percentage (OBP), a broader measure of how often the batter reached base.
Type your numbers into the box above and the math runs instantly in your browser, so nothing about the player or the season is uploaded or stored. Because hits are always recorded inside an at-bat, the calculator will not let hits exceed at-bats.
How does batting average work?
Batting average (AVG) is simply the share of at-bats that ended in a hit. The formula is:
AVG = hits ÷ at-bats
The result is reported to three decimals and spoken as a whole number — .300 is “three hundred,” .275 is “two seventy-five.” On-base percentage extends the idea to every way a batter reaches base safely without being put out:
OBP = (hits + walks + HBP + SF) ÷ (at-bats + walks + HBP + SF)
A few definitions so every term is clear. A hit is a ball put in play that lets the batter reach base safely (a single, double, triple or home run). An at-bat is a completed plate appearance that counts toward average — it excludes walks, hit-by-pitch and sacrifices, which is why those appear only in the OBP formula. A walk (BB) is reaching first on four balls, HBP is hit-by-pitch, and SF is a sacrifice fly. There are no units here: both AVG and OBP are dimensionless ratios between 0 (no hits, or never on base) and 1.000 (a hit, or reaching base, every time).
Why OBP is usually higher than AVG
Average only rewards hits, but on-base percentage also credits walks, hit-by-pitch and sacrifice flies in the numerator. A patient hitter who draws many walks can carry an OBP well above their average, which is why front offices weigh OBP heavily — getting on base any way at all keeps an inning alive.
Examples
Every example below uses the exact formulas above, so you can reproduce each result by entering the same numbers.
Example 1 — a .300 season
A batter has 45 hits in 150 at-bats. Average is hits divided by at-bats:
AVG = 45 ÷ 150 = .300
That is the classic benchmark of a strong hitter — three hits for every ten official at-bats.
Example 2 — adding walks for on-base percentage
Take the same player — 45 hits, 150 at-bats — and add 20 walks with no hit-by-pitch and no sacrifice flies. On-base percentage adds the walks to both the top and bottom of the fraction:
OBP = (45 + 20) ÷ (150 + 20) = 65 ÷ 170 = .382
The average stays .300, but the OBP of .382 shows how much those 20 walks improve the player’s true ability to reach base.
Example 3 — a hot single-game line
In one game a batter goes 3 for 4 — three hits in four at-bats:
AVG = 3 ÷ 4 = .750
Averages this high only appear over a handful of at-bats, like a single game or an early-season sample, before the number settles toward a season figure.
Batting average reference table
The table runs the AVG formula for common hit-and-at-bat lines so you can sanity-check the tool. Each average is hits ÷ at-bats rounded to three decimals.
| Hits | At-bats | AVG | Meaning |
|---|---|---|---|
| 3 | 4 | .750 | A 3-for-4 game |
| 45 | 150 | .300 | A strong, “good” season |
| 1 | 4 | .250 | Roughly league average |
| 30 | 150 | .200 | The Mendoza line |
| 0 | 5 | .000 | Hitless (0-for-5) |
| 4 | 4 | 1.000 | A perfect day at the plate |
Notice that average can range from .000 to 1.000, and that small samples (like 3-for-4) produce far more extreme numbers than a full season ever would.
Common uses
A batting average calculator is useful whenever you have raw hit and at-bat totals but no scoreboard doing the math:
- Tracking a youth or rec-league player across a season from a paper scorebook.
- Checking a softball stat line, since softball uses the identical hits-over-at-bats formula.
- Comparing two hitters by computing both AVG and OBP from their season totals.
- Settling a dugout debate about whether a hot streak really moved someone’s average.
- Doing fantasy or simulation math where you need a player’s rate from counting stats.
Tips and common mistakes
- Use at-bats, not plate appearances. Walks, hit-by-pitch and sacrifices are plate appearances but not at-bats, so leaving them out of the at-bat count is correct for AVG — they belong only in OBP.
- Hits can never exceed at-bats. Every hit happens within an at-bat, so if your hit total is larger than your at-bat total, one of the numbers is a typo. The calculator enforces this.
- Read the number without a leading zero. Baseball writes the ratio as
.300, not0.300or 30 percent; it is still just hits divided by at-bats. - Walks do not change your average. A walk is not an at-bat, so it neither helps nor hurts AVG — but it does raise OBP. Use the right metric for the question.
- Round to three decimals last. Compute the exact division first, then round, so a line like 65 ÷ 170 lands cleanly on .382.
Limitations and notes
This calculator computes batting average as hits over at-bats and on-base percentage using the standard approximation (hits + walks + HBP + SF) ÷ (at-bats + walks + HBP + SF). The official OBP definition uses the same four categories, so for typical box-score inputs the result matches what you would see in a stat line. It does not calculate slugging percentage, OPS, weighted on-base average or other advanced metrics, and it treats every entry as a clean whole number — it will not adjust for unusual scoring decisions or reached-on-error situations, which by rule are not hits. Average and OBP are most meaningful over a reasonable number of at-bats; a tiny sample like 3-for-4 reads .750 but is not predictive. Everything runs privately in your browser, so your numbers are never uploaded or saved and you can run as many lines as you like.
For more scoring and rating math, try the bowling score calculator, the golf handicap calculator or the chess rating calculator, and browse the full sports category.
Frequently asked questions
How do you calculate batting average?+
Divide hits by at-bats, then round to three decimals. For example, 45 hits in 150 at-bats is 45 ÷ 150 = .300.
What is a good batting average in baseball?+
A .300 average is considered very good and .250 is roughly league-average, while anything below .200 is known as the Mendoza line.
What is the difference between batting average and on-base percentage?+
Batting average counts only hits per at-bat, while on-base percentage also credits walks, hit-by-pitch and sacrifice flies, so OBP is usually higher.
How do you calculate on-base percentage?+
Add hits, walks, hit-by-pitch and sacrifice flies, then divide by at-bats plus walks plus hit-by-pitch plus sacrifice flies. 65 ÷ 170 = .382, for instance.
Can hits be more than at-bats?+
No. Every hit is recorded within an at-bat, so hits can never exceed at-bats, and this calculator will not accept more hits than at-bats.
What is a .750 batting average?+
It means three hits in four at-bats, since 3 ÷ 4 = .750. Such a high average only appears over a tiny number of at-bats, like a single game.
Does the batting average calculator work for softball?+
Yes. Softball uses the same hits-divided-by-at-bats formula, so you can enter softball totals and read the average in the same three-decimal style.
Why is batting average written as .300 instead of 30 percent?+
Baseball reports the ratio to three decimals without a leading zero, so .300 is read as three hundred and is the standard scorebook format.