Baseball Stat Calculator
AVG, OBP, SLG and OPS from a line — and why OPS adds two rates that are not measured over the same thing.
Doubles, triples and home runs are counted inside the hits total, so a hit that is not one of those is treated as a single. Sacrifice bunts are deliberately left out — they do not appear in the on-base denominator, which is one of the few places the two sacrifice types differ. Nothing is uploaded.
OPS adds two numbers that are not measured over the same thing
Batting average divides by at-bats. On-base percentage divides by at-bats plus walks, hit-by-pitches and sacrifice flies — a different population. Slugging divides by at-bats again but counts a home run as four, so it is bases per at-bat and its ceiling is 4.000, not 1.000. Adding the second to the third gives a number whose two halves are not comparable, and whose own ceiling is 5.000.
| Hitter | AVG | OBP | SLG | OPS |
|---|---|---|---|---|
| Singles hitter, patient Walks a lot, no power | 0.300 | 0.397 | 0.366 | 0.763 |
| Slugger, free swinger Power, few walks | 0.280 | 0.315 | 0.584 | 0.899 |
| Contact hitter, no walks Never walks, hits sac flies | 0.300 | 0.296 | 0.386 | 0.682 |
| All singles Every hit a single | 0.300 | 0.352 | 0.300 | 0.652 |
| All home runs Every hit over the fence | 0.300 | 0.352 | 1.200 | 1.552 |
The last two rows have identical batting averages and slugging figures 4 times apart, because one hitter's every hit was a single and the other's cleared the fence. Slugging can only equal the average when every hit is a single — that is the one case where total bases and hits are the same number.
And the sacrifice fly is the only way on-base drops below the average
On-base percentage beats batting average exactly when walks times outs-at-bat exceeds hits times sacrifice flies. Walks push it up; sacrifice flies pull it down, because they enter the denominator without ever entering the numerator. Give a hitter no walks and a single sacrifice fly is enough to put on-base below the average — 0.296 against 0.300 here.
| Sacrifice flies (no walks) | Batting average | On-base | |
|---|---|---|---|
| 0 | 0.300 | 0.300 | equal |
| 1 | 0.300 | 0.299 | below the average |
| 2 | 0.300 | 0.299 | below the average |
| 4 | 0.300 | 0.298 | below the average |
| 8 | 0.300 | 0.295 | below the average |
| 12 | 0.300 | 0.293 | below the average |
The batting average never moves across that whole column, because a sacrifice fly is not an at-bat. Only on-base sees it. It is a small effect and a real one, and it is the reason the familiar phrase "on-base is always at least the average" needs the words "with no sacrifice flies" quietly attached.
How to use
- Enter at-bats and hits.
- Enter doubles, triples and home runs, counted inside the hits.
- Add walks, hit-by-pitches and sacrifice flies.
- Read the four rates, and how far on-base sits from the average.
Frequently asked questions
How is slugging percentage calculated?
Total bases divided by at-bats, where a double is two bases and a home run is four. That makes it bases per at-bat rather than a percentage of anything, and its ceiling is 4.000 — reached only by homering every single time up.
Why can slugging go above 1.000?
Because the numerator counts bases, not hits. A hitter with 150 home runs in 500 at-bats slugs 1.200. The name says percentage, but nothing about the figure is bounded by one, which is the commonest misreading of it.
Is OPS a meaningful number?
It correlates well with runs, which is why it caught on. But it adds on-base percentage to slugging, and those divide by different populations with different ceilings — 1.000 and 4.000. It is a useful index, not an average of anything.
Why do OBP and AVG have different denominators?
Batting average divides by at-bats. On-base percentage divides by at-bats plus walks, hit-by-pitches and sacrifice flies, because those are plate appearances where reaching base was possible. The populations genuinely differ.
Can on-base percentage be lower than batting average?
Yes, and there is exactly one way: sacrifice flies. They enter the on-base denominator without ever entering its numerator, so with no walks to offset them a single sacrifice fly is enough to push on-base below the average.
What is the exact condition?
On-base beats the average when walks and hit-by-pitches, times at-bats minus hits, exceeds hits times sacrifice flies. With no sacrifice flies the right side is zero and it can never fall below. The tool reports that margin directly.
When are slugging and batting average equal?
Only when every hit was a single, because that is the one case where total bases equals hits. Any extra-base hit at all pushes slugging above the average, and it can never fall below it.
Does this send anything anywhere?
No. Every figure is computed in your browser, and nothing is uploaded or stored.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.