calculator.onl
Categories50

Baseball OBP, SLG and OPS calculator

Calculate on-base percentage, slugging and OPS from hit types, at-bats, walks, hit-by-pitches and sacrifice flies.

A worked example

Change one single (1B) into a double (2B). Which rate stays the same?

OBP0.433SLG0.580OPS1.013
Official at-bats (AB) from the box score. Walks, hit-by-pitches and sacrifice flies are recorded separately. AB: 0…100000

One-base hits (1B). If your source gives only total hits, subtract doubles, triples and home runs. 1B: 0…100000

Two-base hits (2B). Each contributes one hit and two total bases. 2B: 0…100000

Three-base hits (3B). Each contributes one hit and three total bases. 3B: 0…100000

Home runs (HR). Each contributes one hit and four total bases. HR: 0…100000

Bases on balls (BB). Include walks in the on-base calculation and leave them out of official at-bats. BB: 0…100000

Hit-by-pitches (HBP). Count plate appearances in which the batter was awarded first base for being hit. HBP: 0…100000

Sacrifice flies (SF). They add a plate appearance to the on-base denominator without adding a hit. SF: 0…100000

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

OPS

1.013

Calculated from your inputs

OBP0.433
SLG0.580
Hits35
TB58
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

Enter singles (1B), doubles (2B), triples (3B) and home runs (HR) separately. Their sum cannot exceed official at-bats (AB). For OBP use walks (BB), hit-by-pitches (HBP) and sacrifice flies (SF). SLG weights each hit by bases; OPS adds the two rates. Ratios are displayed to three decimal places. For a related calculation, try Season batting average calculator.

What to enter

InputWhat it meansExample value
ABOfficial at-bats (AB) from the box score. Walks, hit-by-pitches and sacrifice flies are recorded separately. AB: 0…100000 100
1BOne-base hits (1B). If your source gives only total hits, subtract doubles, triples and home runs. 1B: 0…100000 20
2BTwo-base hits (2B). Each contributes one hit and two total bases. 2B: 0…100000 10
3BThree-base hits (3B). Each contributes one hit and three total bases. 3B: 0…100000 2
HRHome runs (HR). Each contributes one hit and four total bases. HR: 0…100000 3
BBBases on balls (BB). Include walks in the on-base calculation and leave them out of official at-bats. BB: 0…100000 15
HBPHit-by-pitches (HBP). Count plate appearances in which the batter was awarded first base for being hit. HBP: 0…100000 2
SFSacrifice flies (SF). They add a plate appearance to the on-base denominator without adding a hit. SF: 0…100000 3

How the calculation works

  1. Change the inputs to explore your own scenario. AB: 0…100000 ; 1B: 0…100000 ; 2B: 0…100000 ; 3B: 0…100000 ; HR: 0…100000 ; BB: 0…100000 ; HBP: 0…100000 ; SF: 0…100000 .
  2. OBP=(H+BB+HBP)/(AB+BB+HBP+SF); SLG=(1B+2×2B+3×3B+4×HR)/AB; OPS=OBP+SLG
  3. Use recorded baseball counting statistics from the same period. Sacrifice bunts and reaching on errors are not added to these formulas. A zero denominator is shown as unavailable, never as a measured zero.
The formulaOBP=(H+BB+HBP)/(AB+BB+HBP+SF); SLG=(1B+2×2B+3×3B+4×HR)/AB; OPS=OBP+SLG

A worked example

AB=100; 1B=20; 2B=10; 3B=2; HR=3; BB=15; HBP=2; SF=3 → H=35; TB=58; OBP=52/120=0.433333; SLG=0.580; OPS=1.013333.

Example you can load

What to enter
Result for this example · OPS1.013

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Use recorded baseball counting statistics from the same period. Sacrifice bunts and reaching on errors are not added to these formulas. A zero denominator is shown as unavailable, never as a measured zero.

Frequently asked questions

Why is OPS different from batting average?

Batting average treats every hit equally and uses H/AB. OPS combines reaching base with extra-base production; it can exceed one.

Where do sacrifice flies enter?

They appear in the OBP denominator. They are not added to official AB when computing SLG.

Should I average several game rates?

Combine the underlying counting statistics over the same games first. An unweighted average of game OBP or SLG can misstate the season rate.