InfyCalculator
🏃

Batting Average Calculator: AVG, OBP, SLG and OPS

Calculate a baseball or softball batting average from hits and at-bats, plus on-base percentage, slugging and OPS, how many straight hits you need to reach .300 (or any target), and how your average changes over the next game.

Hits
At-bats
Walks (BB)
Hit by pitch (HBP)
Sacrifice flies (SF)
Doubles (2B)
Triples (3B)
Home runs (HR)
Target batting average
Loading calculator…

How it works

AVG = H ÷ AB · OBP = (H + BB + HBP) ÷ (AB + BB + HBP + SF) · Total bases = 1B + 2×2B + 3×3B + 4×HR · SLG = TB ÷ AB · OPS = OBP + SLG · ISO = SLG − AVG · Straight hits to reach target T = ⌈(T × AB − H) ÷ (1 − T)⌉

Batting average counts only official at-bats. Walks, hit-by-pitches, sacrifice bunts, sacrifice flies and catcher’s interference are not at-bats, so a patient hitter’s value shows up in on-base percentage instead. OBP adds walks and hit-by-pitches to the hits and counts sacrifice flies in the denominator; it measures how often a batter avoids making an out. Slugging percentage weights each hit by the bases it gains (a home run counts four), and OPS adds OBP and SLG into one quick measure of overall hitting. Averages are written to three decimals without the leading zero (.285), and each .001 is called a point. The target section solves how many hits in a row you need to lift your average to a goal such as .300, or how many hitless at-bats you can absorb before dropping below it. League figures are the 2026 MLB totals from Baseball-Reference: a .244 batting average, .318 OBP, .400 SLG and .719 OPS.

Worked example

57 hits in 200 at-bats is 57 ÷ 200 = .285, a hit every 3.51 at-bats and 41 points above the 2026 MLB average of .244. With no walks or sacrifice flies entered, OBP is also .285. To reach .300 the hitter needs (0.300 × 200 − 57) ÷ 0.7 = 4.29, so 5 straight hits, which gives 62 for 205 = .302. Going 1 for 4 next game would drop the average to .284; 2 for 4 would lift it to .289. Adding 20 walks, 3 hit-by-pitches and 2 sacrifice flies gives OBP = 80 ÷ 225 = .356.

Sources: Baseball-Reference: MLB batting year-by-year averages (2026 season) · Wikipedia: Batting average (definition, rounding, Ted Williams 1941, qualification rule) · Wikipedia: On-base percentage (formula, exclusions, Bonds 2004 record)

Frequently asked questions

How do you calculate batting average?

Divide hits by official at-bats and round to three decimals. 57 hits in 200 at-bats is 57 ÷ 200 = 0.285, written .285. Walks, hit-by-pitches and sacrifices are not at-bats, so they do not change batting average.

What counts as an at-bat?

A completed plate appearance that is not a walk, hit-by-pitch, sacrifice bunt, sacrifice fly or catcher’s interference. Reaching on an error or a fielder’s choice still counts as an at-bat without a hit.

What is a good batting average?

The 2026 MLB league average was .244, so .270 is above average and .300 is excellent. No major leaguer has hit .400 over a full season since Ted Williams went 185 for 456 (.406) in 1941. Youth and amateur leagues run much higher.

How is OBP different from batting average?

OBP counts every way of reaching base except errors and fielder’s choices: (H + BB + HBP) ÷ (AB + BB + HBP + SF). Barry Bonds’s 2004 season shows the gap: a .362 batting average but a record .609 OBP thanks to 232 walks.

How many hits do I need to get to .300?

Solve (H + x) ÷ (AB + x) = .300 for x: x = (0.3 × AB − H) ÷ 0.7, rounded up. A .285 hitter at 57 for 200 needs 5 hits in a row. The calculator does this for any target average.

What is OPS?

On-base plus slugging: OBP + SLG. It combines getting on base with hitting for power. The 2026 MLB average OPS was .719; as a rough guide, .800 is very good and .900 or more is star level.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.