calculatortoolshub
Runs on your device

Batting Average Calculator

Quickly and accurately calculate your baseball or softball batting average (AVG), on-base percentage (OBP), and plate appearances with this free calculator.

Your inputs

Inputs stay on your device.

Your result
0.300

batting average (avg)

On-Base Percentage (OBP): 0.300

View breakdown
On-Base Percentage (OBP) 0.300
Total Plate Appearances (PA) 550
Total Times on Base (TOB) 165
At-Bats per Hit Ratio 3.33

What the Batting Average & OBP Calculator Computes

The batting average calculator computes a baseball or softball player's official Batting Average (AVG) and On-Base Percentage (OBP) to three decimal places (.300 format), along with Total Plate Appearances (PA), Total Times on Base (TOB), and At-Bats per Hit Ratio. By accepting both official At-Bats (AB) and non-at-bat plate appearances (Walks, Hit by Pitch, and Sacrifice Flies), it evaluates traditional hitting average and modern sabermetric on-base efficiency in a single pass.

Under Official Baseball Rule 9.21, Batting Average (H ÷ AB) measures how often a batter records a base hit (single, double, triple, or home run) during an official At-Bat. However, because walks (BB) and hit-by-pitches (HBP) are excluded from At-Bats, Batting Average ignores a hitter's plate discipline.

On-Base Percentage ((H + BB + HBP) ÷ (AB + BB + HBP + SF)) corrects that blind spot by measuring the fraction of all plate appearances in which the batter avoids making an out and reaches base safely.

Tracking pitching statistics for your team as well? Calculate Earned Run Average and fractional innings pitched (1/3 and 2/3 outs) in the ERA Calculator.

Common use cases

  • Baseball & Fastpitch Softball Stat TrackingTrack game, tournament, or full-season AVG and OBP across Little League, high school, NCAA, or adult slowpitch/fastpitch leagues.
  • AVG vs. OBP Lineup EvaluationCompare a high-average free swinger against a patient leadoff hitter who draws walks and reaches base at a .390+ clip.
  • Hits Needed for .300 MilestoneTest how going 3-for-4 or 4-for-8 over a weekend series lifts your season batting average across the .300 or .400 threshold.
  • Official Scorer Box-Score ChecksVerify that walks, hit-by-pitches, and sacrifices are properly excluded from At-Bats while included in Plate Appearances.

How Official MLB Batting Average and On-Base Percentage Formulas Work

The calculator divides Hits by official At-Bats for Batting Average, and divides Total Times on Base (Hits + Walks + Hit by Pitch) by Total Plate Appearances for On-Base Percentage.

Batting Average (AVG) = Hits (H) ÷ At-Bats (AB); Times on Base (TOB) = H + BB + HBP; Plate Appearances (PA) = AB + BB + HBP + Sacrifices; OBP = TOB ÷ PA
  • Hits (H): Total base hits (1B + 2B + 3B + HR) credited by the official scorer (H ≤ AB).
  • At-Bats (AB): Official trips to the plate that result in a hit, a fielder's choice, an error, or a non-sacrifice out.
  • Walks (BB) & Hit by Pitch (HBP): Bases on balls (including intentional walks) and times awarded first base after being struck by a pitch.
  • Sacrifices (SF / SH): Sacrifice flies and sacrifice bunts (excluded from At-Bats; sacrifice flies count in the OBP denominator).

Consider the High-OBP Leadoff preset (140 Hits in 520 At-Bats with 95 Walks, 10 HBP, and 3 Sacrifice Flies): the player's Batting Average is 140 ÷ 520 = .269 (3.71 At-Bats per Hit), but with 245 Total Times on Base across 628 Plate Appearances, their On-Base Percentage is an elite 245 ÷ 628 = .390.

If you only want to compute Batting Average and do not have walk or HBP totals, leave Walks, Hit by Pitch, and Sacrifices at 0; OBP will then equal AVG.

According to Major League Baseball (MLB Standard Stats Glossary — Batting Average & On-Base Percentage), batting average is determined by dividing a player's hits by their total at-bats (excluding walks, hit-by-pitches, sacrifices, and interference), while On-Base Percentage includes walks, hit-by-pitches, and sacrifice flies.

To calculate strikeout rate (K% = SO ÷ PA) or walk rate (BB% = BB ÷ PA) as a percentage, use the proportional percent increase worksheet.

How to Calculate Batting Average and OBP

Enter your Hits and official At-Bats first, then toggle the OBP option if you also want Walks, Hit by Pitch, and Sacrifices included.

  1. Enter Total Hits (H) and Official At-Bats (AB): Input whole-number Hits and official At-Bats (do not include walks or hit-by-pitches inside your At-Bats number).
  2. Optionally Include Walks, Hit by Pitch, and Sacrifices: Check Include Walks (BB), Hit by Pitch (HBP) & Sacrifice Flies for OBP to enter Walks (BB), Hit by Pitch (HBP), and Sacrifice Flies (SF) for exact On-Base Percentage and Plate Appearances.
  3. Read .000-Format AVG, OBP, and Per-Hit Ratio: Check Batting Average and On-Base Percentage at the top, and open the breakdown drawer for Total Plate Appearances, Times on Base, and At-Bats per Hit.

If a college player has 38 Hits in 95 official At-Bats along with 14 Walks, 3 Hit by Pitches, and 2 Sacrifice Flies, their Batting Average is .400 (2.50 AB per Hit), Total Times on Base is 55 across 114 Plate Appearances, and On-Base Percentage is .482.

Worked numerical examples

.300 All-Star Season (165 H in 550 AB · 65 BB)

165 ÷ 550 = .300 AVG; (165 + 65 + 6) ÷ (550 + 65 + 6 + 5) = 236 ÷ 626

Result.300 AVG (.377 OBP · 626 PA)
High-OBP Leadoff Hitter (140 H in 520 AB · 95 BB)

140 ÷ 520 = .269 AVG; (140 + 95 + 10) ÷ (520 + 95 + 10 + 3) = 245 ÷ 628

Result.269 AVG (.390 OBP · 628 PA)
30-Game College/HS Season (38 H in 95 AB · 14 BB)

38 ÷ 95 = .400 AVG; (38 + 14 + 3) ÷ (95 + 14 + 3 + 2) = 55 ÷ 114

Result.400 AVG (.482 OBP · 114 PA)
Batting Average Calculator Benchmark Scenarios (Batting Average (AVG) · On-Base Percentage (OBP) · Total Plate Appearances (PA))
Batting Average Calculator Benchmark Scenarios (Batting Average (AVG) · On-Base Percentage (OBP) · Total Plate Appearances (PA))
ScenarioBatting Average (AVG)On-Base Percentage (OBP)Total Plate Appearances (PA)
Weekend Tournament (6 H in 15 AB · 3 BB)0.40.52619
High School / College Season (38 H in 95 AB · 14 BB)0.40.482114
MLB League Average (130 H in 525 AB · 48 BB)0.2480.314582
High-Discipline Leadoff (140 H in 520 AB · 95 BB)0.2690.39628
.300 All-Star Hitter (165 H in 550 AB · 65 BB)0.30.377626
Batting Title Contender (192 H in 575 AB · 72 BB)0.3340.409655

Official Scoring Rules for At-Bats and Plate Appearances

Knowing which plate outcomes count as an official At-Bat (AB) explains why a batter can go 4 plate appearances without changing their batting average.

What Does NOT Count as an At-Bat

Base on balls (BB), hit by pitch (HBP), sacrifice fly (SF), sacrifice bunt (SH), and catcher's interference award a Plate Appearance (PA) without charging an official At-Bat (AB).

Reaching on a Fielding Error (ROE)

When a batter reaches base solely because of a defensive error, the official scorer charges an 0-for-1 At-Bat (AB + 1, H + 0), which lowers both AVG and OBP.

Sacrifice Fly vs. Sacrifice Bunt in OBP

In official MLB/NCAA statistics, a sacrifice fly (SF) increases the OBP denominator (lowering OBP), whereas a sacrifice hit/bunt (SH) is excluded from both the AVG and OBP denominators.

MLB Benchmark Tiers (.250 / .300 / .350)

In modern Major League Baseball, league-average AVG hovers around .245–.250 (.312–.318 OBP), while .300 AVG and .370+ OBP represent All-Star offensive production.

Why Tracking AVG and OBP Together Gives the Full Picture

Evaluating both hitting accuracy and on-base frequency prevents undervaluing disciplined hitters.

  • Three-Decimal (.000) Precision: Formats both Batting Average and On-Base Percentage to the standard three decimal places used in official baseball box scores.
  • Simultaneous PA & TOB Totals: Sums Total Plate Appearances and Total Times on Base automatically from your stat line.
  • At-Bats per Hit Frequency: Shows how many official At-Bats the player takes per base hit (3.33 AB/H for a .300 hitter).
  • Cross-Field Scorer Validation: Prevents impossible stat lines by validating that Hits ≤ At-Bats and all counts are non-negative integers.

subtracting a player's Batting Average from their On-Base Percentage (OBP − AVG, known as Walk/On-Base Iso) immediately shows how much value their eye at the plate adds beyond base hits (e.g., .390 OBP − .269 AVG = .121 on-base boost).

For racquet-sport players tracking match-by-match skill progression alongside baseball stats, estimate DUPR-style movement in the Pickleball Rating Calculator.

Scoring Nuances That Affect Batting Average and OBP

Review these official baseball and softball scoring rules when entering box-score totals.

  • Fielder's Choice (FC) Counts as an Out: When a batter hits a ground ball and a baserunner is forced out at second, third, or home, the batter is charged with an 0-for-1 At-Bat (AB + 1, H + 0).
  • Dropped Third Strike Rule: If a batter reaches first base on an uncaught third strike (wild pitch or passed ball), the batter is still charged with an 0-for-1 strikeout At-Bat (AB + 1, H + 0).
  • Pinch-Hit & Late-Inning Walk-Off Rules: On a game-ending walk-off hit with runners on base, the batter is credited with only as many bases as needed to score the winning run (unless they hit an out-of-the-park home run).
  • Treats Batting Average and On-Base Percentage equally across all hit types (1B = 2B = 3B = HR); to weight extra-base power, calculate Slugging Percentage (SLG = Total Bases ÷ AB).
  • In the Sacrifices field, enter only Sacrifice Flies (SF) if you want strict MLB OBP (since MLB excludes Sacrifice Bunts SH from the OBP denominator).

Evaluating a pitching staff alongside your lineup? Switch to our ERA calculator to compute Earned Run Average, fractional innings pitched, and runs allowed per inning.

According to NCAA (Baseball and Softball Statisticians' Manual — Official Scoring Rules), reaching base on a defensive error or a fielder's choice is charged as a time at bat without a hit, lowering both batting average and on-base percentage.

Explore our Sports calculators hub for additional baseball, football, basketball, golf, and pickleball analytics tools.

Frequently asked questions

How is batting average calculated in baseball and softball?

Divide total base Hits (H) by official At-Bats (AB), and round to three decimal places (H ÷ AB). For example, 165 hits in 550 at-bats equals 165 ÷ 550 = 0.300 (written .300).

Do walks or hit-by-pitches count in Batting Average?

No. Walks (BB) and Hit by Pitches (HBP) do not count as official At-Bats, so they neither help nor hurt your Batting Average. However, they do count as Times on Base and Plate Appearances in On-Base Percentage (OBP).

What is the formula for On-Base Percentage (OBP)?

On-Base Percentage equals (Hits + Walks + Hit by Pitch) ÷ (At-Bats + Walks + Hit by Pitch + Sacrifice Flies). It measures how often a batter reaches base safely without a fielding error or fielder's choice.

Does reaching base on an error or fielder's choice help my OBP?

No. Both reaching on a defensive error (ROE) and reaching on a fielder's choice (FC) count as 0-for-1 official At-Bats (AB + 1, Hits + 0), which lowers both your Batting Average and your On-Base Percentage.

What is considered a good Batting Average and OBP?

In Major League Baseball, .250 AVG and .315 OBP are roughly league average, .280+ AVG and .350+ OBP are strong above-average marks, and .300+ AVG or .380+ OBP are All-Star caliber. In high school and college metal-bat leagues, .330+ AVG and .420+ OBP are typical standout benchmarks.

How many Plate Appearances are needed to qualify for an MLB batting title?

Under Official Baseball Rule 9.22(a), a batter needs 3.1 Plate Appearances per scheduled team game—which is 502 Plate Appearances in a 162-game MLB season.

Ready to use

Loading tools…