OPS is calculated by adding a player's on-base percentage (OBP) and their slugging percentage (SLG). To calculate a player's OBP, the formula is: (Hits + Walks + Hit-by-Pitch) / (At-bats + Walks + Hit-by-Pitch + Sacrifice Flies). This measures how often a player reaches base safely, through hits, walks, or hit-by-pitches. To calculate a player's SLG, the formula is: Total Bases / At-bats. This measures the player's power, by calculating the total bases per at-bat. Once a player's OBP and SLG are calculated, they are added together to give the player's OPS.