Baseball On-Base Percentage Calculator

Calculate OBP, SLG, and OPS from a player's batting line.

Enter at-bats, hits, doubles, triples, home runs, walks, hit-by-pitches, and sacrifice flies to compute On-Base Percentage, Slugging, and OPS using the official MLB formulas. Runs in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is On-Base Percentage?

On-Base Percentage measures how often a batter reaches base via a hit, walk, or hit-by-pitch. It is calculated as (H + BB + HBP) divided by (AB + BB + HBP + SF) and is a better measure of offensive value than batting average because it counts walks.

Batting average undersells patient hitters by ignoring walks. On-Base Percentage and Slugging together — summarised as OPS — give a far truer picture of offensive value. This calculator applies the exact MLB formulas, including the subtle role of sacrifice flies in the OBP denominator.

How it works

The three statistics build on each other from a single batting line:

OBP = (H + BB + HBP) / (AB + BB + HBP + SF)
TB  = singles + 2×doubles + 3×triples + 4×home runs
SLG = TB / AB
OPS = OBP + SLG

Singles are derived as hits minus the extra-base hits, so you only enter total hits plus the doubles, triples, and home runs. Sacrifice flies count in the OBP denominator but never as at-bats.

Worked example

For example, a batter with:

  • 400 at-bats
  • 130 total hits (including 28 doubles, 3 triples, 22 home runs)
  • 60 walks, 5 hit-by-pitches, 6 sacrifice flies

Calculating each stat:

singles    = 130 - 28 - 3 - 22 = 77
total bases = 77 + (28×2) + (3×3) + (22×4) = 77 + 56 + 9 + 88 = 230
OBP = (130 + 60 + 5) / (400 + 60 + 5 + 6) = 195 / 471 ≈ .414
SLG = 230 / 400 = .575
OPS = .414 + .575 = .989

This is an elite season. Make sure extra-base-hit counts never exceed total hits, or the singles figure goes negative.

What these numbers mean in context

OPS benchmarks give rough calibration for major league performance:

OPS rangeTier
.900 and aboveElite (top hitters in the league)
.800–.899Very good
.700–.799Average to above average
.600–.699Below average
Below .600Poor for a regular hitter

OBP and SLG weight differently in terms of run production. Research on run expectancy (most famously by Pete Palmer and later confirmed by sabermetricians) suggests OBP is roughly 1.7–1.8 times more valuable than SLG in terms of run generation. That is why a player with a .360 OBP and .420 SLG (.780 OPS) often contributes as much offensively as a player with a .310 OBP and .470 SLG (.780 OPS) — even though OPS treats them as equal.

Why sacrifice flies matter in OBP but not batting average

A sacrifice fly — a fly ball that scores a runner — is treated differently by the two statistics. Batting average excludes it entirely from the denominator (it is not an at-bat), making a sac fly “free” in BA terms. OBP adds it to the denominator because the batter used a plate appearance and did not reach base. This is the correct treatment: the batter had a chance and did not get on, even if they produced an out with value. Sacrifice bunts are excluded from both the OBP numerator and denominator, which is a separate and sometimes debated rule.