About this tool
The Batting Average, OBP, SLG & OPS Calculator converts a hitter's counting stats into the core rate statistics used across baseball. Enter at-bats (AB) directly, or switch to plate-appearance mode and let the tool derive AB = PA − BB − HBP − SF − SH. Add hits, doubles, triples, home runs, walks, hit-by-pitch, sacrifice flies and sacrifice hits, and it computes each average instantly.
The formulas follow the standard definitions. Batting average is BA = H/AB. On-base percentage is OBP = (H + BB + HBP) / (AB + BB + HBP + SF). Slugging is SLG = TB/AB, where total bases TB = 1B + 2·2B + 3·3B + 4·HR and singles are found as 1B = H − 2B − 3B − HR. OPS is simply OBP + SLG, and isolated power is ISO = SLG − BA, measuring extra-base ability apart from raw average.
Results are shown to three decimal places with the leading zero dropped, exactly as they appear on a scoreboard or baseball card (for example .300 rather than 0.300). All arithmetic happens locally in your browser, so nothing you enter is uploaded. The tool guards against impossible lines — hits greater than at-bats, or extra-base hits exceeding total hits — so you always get a sensible number rather than a broken one.