Batting average is calculated by taking a player’s total hits and dividing them by at bats (H/AB).
A player who had 500 at bats in a season (about 3 per team game) and hit .300, that would mean they had 150 hits during the season.
This stat encompasses more than just batting average in that it takes into account all times a hitter reaches base. Errors and fielder’s choice don’t count towards this total, but it does include hits, walks, and a batter being hit by pitch.
If we take the player from batting average, and say he also got 40 walks and 3 hit by pitches, his OBP would be .384.
Slugging encompasses total bases (including all extra base hits) divided by at bats. The benefit of slugging as a stat is that it adds additional weight to a player’s extra base hits, rather than rating all hits the same, as batting average does. The weighting works by counting a single as 1, a double as 2, a triple as 3, and a home run as 4.
For example, in a 3 game span, a batter goes 5-14 with a double and a home run. Because the player had three singles, a double, and a home run, we get a total of 9 which we divide by the number of at bats, 14. Their batting average would be .357 but their slugging would be .600.
This can be considered an overall assessment of a player’s production, as it considers both how often the batter gets to base (OBP) and how often they are hitting for extra bases (SLG). An OPS over 1.000 is considered a phenomenal season.
Taking the player from slugging, and assuming they also drew a walk in the series, their OBP would be 1.028. They reached base safely 6 times in 14 trips to the plate, .428 OBP, and slugged .600; adding these together gives us the OPS, 1.028.