Question: how to calculate obp and slg?
Answer: Partial solutions: OBP, SLG and OPS. It is calculated by adding hits, walks and hit by pitches and dividing that by total plate appearances (not just at bats). Slugging Percentage (SLG) attempts to measure the relative value of a player's hits by dividing Total Bases (4 for a home run, 3 for a triple, etc.)