Audited ·Last updated ·6 citations·Tier 1·0 uses

On-Base Percentage Calculator (OBP) — Sacrifice Flies Handled Correctly

Free OBP calculator using Official Baseball Rule 9.21(f). Sacrifice flies count in the denominator, sacrifice bunts do not — most calculators get this wrong.

On-Base Percentage Calculator

Singles, doubles, triples and home runs. Reaching base on an error, a fielder's choice or a dropped third strike is not a hit and is not a time on base.
At-bats, not plate appearances. Rule 9.02(a)(1) already removes walks, hit-by-pitches, both kinds of sacrifice and interference awards from this figure.
Include intentional walks — Rule 9.21(f) makes no distinction between them and any other base on balls.
Counts in both the numerator and the denominator, exactly like a walk.
These DO count in the denominator and will lower the result. A sacrifice fly is invisible to batting average but visible to on-base percentage — that asymmetry is in the rulebook, not an oversight.
These do NOT count in the denominator and cannot change the result. The field is here so you can see the difference between the OBP denominator and plate appearances.
Catcher's interference, obstruction and shift-restriction awards. Rule 9.21(f) Comment says to ignore these when computing on-base percentage — they count as plate appearances only.
On-base percentage
0.458
(H + BB + HBP) ÷ (AB + BB + HBP + SF), the quotient Official Baseball Rule 9.21(f) defines. Printed to three decimal places with the leading zero dropped.
Times on base
322
OBP denominator
703
Plate appearances
704
Batting average
0.322
OBP minus batting average
0.136

Background.

On-base percentage answers the only question that matters at the plate: how often does this hitter avoid making an out? Official Baseball Rule 9.21(f) gives the formula in one sentence — divide the sum of hits, bases on balls and times hit by pitch by the sum of at-bats, bases on balls, times hit by pitch and sacrifice flies. Four terms on the bottom. Not three, not five, and emphatically not plate appearances.

That denominator is the entire reason this page exists, because two of its details are wrong in most on-base percentage calculators on the internet. The first is the sacrifice fly. A sacrifice fly is not an at-bat, so it does not touch batting average at all — but Rule 9.21(f) names it explicitly as the fourth denominator term, so it does lower on-base percentage. MLB's own glossary states the asymmetry in as many words: a sacrifice fly "does not count against a player's batting average… However, sacrifice flies count against a player's on-base percentage." The second is the sacrifice bunt, which is the mirror image: it is not an at-bat and it is not one of the four terms, so it disappears from on-base percentage entirely. MLB's glossary explains the logic — "it is rarely a hitter's decision to sacrifice himself, but rather a manager's choice as part of an in-game strategy". Two kinds of sacrifice, two opposite treatments, and a calculator that lumps them together is wrong about one of them.

The third trap is subtler and costs a full point of on-base percentage. Plate appearances and the on-base denominator are not the same number. Rule 9.22(a) defines a plate appearance as at-bats plus walks plus hit-by-pitches plus sacrifice hits plus sacrifice flies plus times awarded first base on interference, obstruction or a shift-restriction violation. That is two terms more than the OBP denominator, and Rule 9.21(f)'s own Comment instructs the scorer to ignore interference awards specifically when computing on-base percentage. Aaron Judge reached base 322 times in 2024 against a denominator of 703, which is .458. Divide the same 322 by his 704 plate appearances and you get .457. One catcher's interference award in an entire season, one point of on-base percentage. This calculator asks for sacrifice bunts and interference awards precisely so it can show you both numbers side by side and prove they differ.

The statistic itself is younger than the game by seventy years. MLB's glossary credits its invention to Dodgers executive Branch Rickey and statistician Allan Roth in the 1940s and 50s, and records that it did not become an official statistic until 1984 — which is why on-base percentage before the mid-1950s has to be reconstructed, and why sacrifice-fly data before 1954, when the category was formally separated from the sacrifice bunt, is patchy. The page reports batting average alongside on-base percentage and the gap between them, because that gap is the whole argument. A hitter batting .322 with a .458 on-base percentage has 136 points of value that batting average cannot see, all of it in walks and hit-by-pitches, all of it invisible to the statistic most fans still quote first.

Below the widget you will find the rule text verbatim, the full list of what does and does not count as a time on base, a worked example reproducing a Most Valuable Player season from official MLB data — including the interference award that moves the answer — two further published seasons as independent checks, the qualifying rule for the on-base title, and an honest account of what on-base percentage still misses, which is everything about what happens after the hitter reaches.

What is on-base percentage calculator?

On-base percentage (OBP), also called on-base average, is the share of a hitter's qualifying plate appearances in which he reached base by hit, walk or hit-by-pitch. Official Baseball Rule 9.21(f) defines it as (H + BB + HBP) ÷ (AB + BB + HBP + SF). Unlike batting average it counts walks and hit-by-pitches, which is the point: from a run-scoring perspective a walk and a single put the same runner on the same base, and a hitter who draws 130 walks creates enormous value that batting average records as nothing at all. Three ways of reaching base are deliberately excluded — an error, a fielder's choice and a dropped third strike — because in each case the batter did not earn the base; MLB's glossary lists all three. So is a catcher's interference award, by explicit instruction in Rule 9.21(f)'s Comment. The scale runs from .000 to 1.000; the Major League average has sat near .312 to .320 in recent seasons, .350 is a strong regular, .400 is an elite season and only a handful of hitters in history have finished a career above .450. The same qualifying rule as the batting title applies: Rule 9.22(a) requires 3.1 plate appearances per scheduled team game, which is 502 in a 162-game season. Because OBP measures only the avoidance of outs, it says nothing about what kind of base was reached — that is slugging percentage's job, and the two are added together to form OPS.

How to use this calculator.

  1. Enter hits and official at-bats from the box score. At-bats already exclude walks, hit-by-pitches, both kinds of sacrifice and interference awards, so do not subtract anything yourself.
  2. Enter walks including intentional walks. The rule makes no distinction, and neither does this calculator.
  3. Enter hit-by-pitches. They behave exactly like walks: they add to both the top and the bottom of the fraction.
  4. Enter sacrifice flies carefully. These raise the denominator and lower the result. If your source lists only a combined 'sacrifices' column — common for pre-1954 data — you cannot split it, and the resulting OBP will be slightly too low.
  5. Enter sacrifice bunts and interference awards even though they cannot change the answer. They feed the plate-appearance output, which exists so you can see with your own eyes that plate appearances and the OBP denominator are different numbers.
  6. Read the gap between on-base percentage and batting average at the bottom. Around .060 to .070 is ordinary; above .100 marks a genuinely selective hitter; below .050 usually means a free swinger whose batting average is carrying his entire offensive case.

The formula.

OBP = (H + BB + HBP) ⁄ (AB + BB + HBP + SF)

The numerator is easy and the denominator is where every mistake lives.

Numerator: hits plus walks plus hit-by-pitches. Three ways of reaching base, and only three. An error is not one of them, because the batter made an out that a fielder failed to convert. A fielder's choice is not one, because a runner was retired on the play. A dropped third strike is not one, because the batter struck out. MLB's glossary lists all three exclusions explicitly. In every one of those cases the hitter ends up standing on first base and his on-base percentage does not move.

Denominator: at-bats plus walks plus hit-by-pitches plus sacrifice flies. Read it as 'every plate appearance in which the hitter was responsible for the outcome'. A walk and a hit-by-pitch are added back in — they were removed from at-bats, and on-base percentage wants them. A sacrifice fly is added back in because, although the manager may have wanted a fly ball, the hitter still failed to reach base and a run scored regardless. A sacrifice bunt is not added back in because it is a called play the hitter did not choose. An interference award is not added back in by explicit instruction in the rule's own Comment.

Why that matters arithmetically: plate appearances exceed the on-base denominator by exactly the number of sacrifice bunts plus interference awards. For a modern power hitter who never bunts, that difference is zero or one — and a difference of one is enough to move a season on-base percentage by a full point, because the denominator is around 700 and one part in 700 is 0.0014. The calculator shows both numbers so the discrepancy is visible rather than mysterious.

The supporting outputs are simple algebra on the same inputs. Batting average is hits over at-bats. The difference between the two rates isolates the contribution of free passes: OBP − AVG is, to a very close approximation, (BB + HBP) divided by the on-base denominator, scaled by how much of the denominator those events represent. A hitter with 133 walks and 9 hit-by-pitches in 703 qualifying appearances carries a gap of .136, which is to say more than a hundred points of his ability to avoid an out are simply not in his batting average.

One precision note. Baseball prints on-base percentage to three decimals. Rounding intermediate values to three decimals and then subtracting produces visible error in the third place, so this calculator carries every intermediate at full precision and rounds once, at the display boundary.

A worked example.

Example

Aaron Judge won the 2024 American League Most Valuable Player award with a season built almost as much on walks as on home runs. MLB's official data feed gives his line as 559 at-bats, 180 hits, 133 walks, 9 hit-by-pitches, 2 sacrifice flies, no sacrifice bunts — and one award of first base on catcher's interference. Numerator: 180 + 133 + 9 = 322 times on base. Denominator, per Rule 9.21(f): 559 + 133 + 9 + 2 = 703. Divide: 322 ÷ 703 = 0.458036984…, which the calculator returns as 0.4580369844 and MLB publishes as .458. Now look at the plate-appearance output: 704, because the interference award counts as a plate appearance even though Rule 9.21(f)'s Comment orders it ignored for on-base percentage. Divide 322 by 704 instead and you get .457 — a full point lower, from one plate appearance in a 158-game season. That is the error this page is built to prevent, and it is invisible unless you print both denominators. The contrast with batting average is the other story here. Judge hit .322, which is excellent; his on-base percentage was .458, which is historic. The 136-point gap between them is entirely walks and hit-by-pitches, and it is the single clearest illustration of why on-base percentage exists: a hitter who reaches base 322 times contributes far more than one who collects 180 hits, and only one of those two numbers is in his batting average.

hits180
sacrifice Flies2
walks133
sacrifice Bunts0
catchers Interference1
hit By Pitch9
at Bats559

Frequently asked questions.

What is the on-base percentage formula?
OBP = (H + BB + HBP) ÷ (AB + BB + HBP + SF). Official Baseball Rule 9.21(f) words it as "divide the sum of hits, bases on balls and times hit by pitch by the sum of at-bats, bases on balls, times hit by pitch and sacrifice flies". Four denominator terms, and sacrifice flies are the fourth. Anything you have seen with three terms, or with plate appearances on the bottom, is not the official formula.
Does a sacrifice fly count against on-base percentage?
Yes, and this is the question that brings most people to this page. A sacrifice fly is not an at-bat, so it leaves batting average completely untouched — but Rule 9.21(f) names it as the fourth term of the on-base denominator, so it does lower on-base percentage. MLB's own glossary spells out the asymmetry: "A sacrifice fly does not count as an at-bat and therefore does not count against a player's batting average… However, sacrifice flies count against a player's on-base percentage." The reasoning is that the batter still made an out.
Do sacrifice bunts count in on-base percentage?
No — not in the numerator and not in the denominator. Rule 9.21(f) lists exactly four denominator terms and sacrifice hits are not among them, and Rule 9.02(a)(1) already excludes them from at-bats. MLB's glossary gives the reasoning: "sacrifice bunts are removed from the equation entirely, because it is rarely a hitter's decision to sacrifice himself, but rather a manager's choice as part of an in-game strategy." A player who bunts twenty times in a season has exactly the same on-base percentage he would have had with zero.
Is the OBP denominator the same as plate appearances?
No, and treating them as the same is the most common error in on-base calculators. Rule 9.22(a) defines plate appearances as at-bats plus walks plus hit-by-pitches plus sacrifice hits plus sacrifice flies plus interference awards. The on-base denominator drops the last two of those. The gap is small — often zero or one for a modern hitter — but one plate appearance out of roughly 700 is worth a full point of on-base percentage, which is exactly the margin that decides an on-base title.
Does reaching base on an error count in on-base percentage?
No. MLB's glossary is explicit that times on base "do not include errors, times reached on a fielder's choice or a dropped third strike". In all three cases the hitter is standing on first base and his on-base percentage has not moved, because in all three the plate appearance was an out that the defence failed to record cleanly. The at-bat is still charged, so all three actively lower on-base percentage. Catcher's interference is different again: Rule 9.21(f)'s Comment says to ignore it entirely, so it neither helps nor hurts.
What is a good on-base percentage?
Against a modern Major League baseline of roughly .312 to .320, a .350 on-base percentage marks a solid regular, .400 an excellent season, and .420 or better a genuine league-leading one. The all-time career leader, Ted Williams, finished at .482. Because the baseline moves with the run environment, read the number against its own league and season: .350 in a low-offence year is worth considerably more than the same figure in a high-offence one. The gap between a hitter's on-base percentage and his batting average is often more informative than either alone.
Why is on-base percentage considered more important than batting average?
Because outs are the scarce resource. A team gets 27 of them and nothing else limits how many runs it can score, so a hitter's first job is not to spend one. Batting average measures only the subset of plate appearances that ended in an at-bat, and it treats a walk as though the trip to the plate never happened. Two hitters can both bat .270 while one reaches base 40% of the time and the other 30%, and over a season that difference is worth dozens of runs. Run-estimation models built on on-base percentage consistently outperform those built on batting average, which is why front offices reweighted towards it decades ago.
How many plate appearances do you need to qualify for the on-base title?
The same threshold as the batting title. Rule 9.22(a) requires 3.1 plate appearances per scheduled team game — 162 × 3.1 = 502.2, rounded down to 502 — and names the batting, slugging and on-base percentage championships together in one sentence. Note that the qualifier is measured in plate appearances even though the OBP denominator is not plate appearances; the two totals genuinely serve different purposes and this is not an inconsistency.
Can on-base percentage be lower than batting average?
Only in a contrived case, and it takes sacrifice flies to do it. If a hitter never walks and is never hit by a pitch but records sacrifice flies, the denominator grows while the numerator does not, so on-base percentage falls below batting average. In real data it essentially never happens over a full season because every hitter draws some walks. If this calculator shows you a negative gap, check whether you have entered walks in the wrong field.
How far back does on-base percentage data go?
The statistic was devised by Branch Rickey and Allan Roth in the 1940s and 50s and, per MLB's glossary, did not become an official statistic until 1984. Everything before that is a reconstruction from surviving box scores. There is a hard data boundary at 1954, when the sacrifice fly was separated from the sacrifice bunt as its own category; before that the two were recorded together in most seasons, so the fourth denominator term cannot be recovered exactly and pre-1954 on-base percentages carry a small unavoidable uncertainty.

References& sources.

  1. [1]Office of the Commissioner of Baseball (2025). Official Baseball Rules, 2025 Edition, Rule 9.21(f) and Comment: "On-base percentage (or on-base average), divide the sum of hits, bases on balls and times hit by pitch by the sum of at-bats, bases on balls, times hit by pitch and sacrifice flies", and "For the purpose of computing on-base percentage, ignore instances of a batter being awarded first base on interference, obstruction, or shift restriction violation." This is the definition implemented here.
  2. [2]Office of the Commissioner of Baseball (2025). Official Baseball Rules, Rule 9.22(a): "Total appearances at the plate shall include official times at bat, plus bases on balls, times hit by pitcher, sacrifice hits, sacrifice flies and times awarded first base because of interference, obstruction, or shift restriction violation", together with the 3.1-per-scheduled-game qualifying standard. Source of the plate-appearance output and of the demonstration that PA is not the OBP denominator.
  3. [3]Major League Baseball. Official MLB Glossary, "On-base Percentage (OBP)": times on base "include hits, walks and hit-by-pitches, but do not include errors, times reached on a fielder's choice or a dropped third strike", the note that sacrifice bunts are removed from the equation entirely as a manager's choice, and the history — invented by Branch Rickey and Allan Roth in the 1940s–50s, official only from 1984.
  4. [4]Major League Baseball. Official MLB Glossary, "Sacrifice Fly (SF)": "A sacrifice fly does not count as an at-bat and therefore does not count against a player's batting average… However, sacrifice flies count against a player's on-base percentage", and the note that the sacrifice fly became an official rule in 1954.
  5. [5]Major League Baseball. Official MLB Glossary, "Plate Appearance (PA)" and "At-bat (AB)": plate appearance is every completed turn batting; at-bats are the denominator for batting average and slugging percentage; total plate appearances rather than at-bats determine who qualifies for the rate-statistic leaderboards.
  6. [6]MLB Stats API (statsapi.mlb.com), season hitting statistics for player 592450 (Aaron Judge), 2024: 559 at-bats, 180 hits, 133 walks, 9 hit-by-pitch, 2 sacrifice flies, 1 catcher's interference, 704 plate appearances, published obp ".458". Source of the worked example. The same endpoint for players 677951 and 660271 supplies the two independent checks used in this calculator's unit tests.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 590 calculators remain free
  • No billing is enabled
Coming soon