Figuring out baseball statistics can sometimes be frustrating, so here is a guide to calculating some of the categories:

* On-base percentage--Add the total number of hits, walks and hit by pitches and divide by the total of at-bats, walks, hit by pitches and sacrifices.

* Slugging percentage--Divide the total bases from all hits (a single is worth one base, a double two, etc.) by the total number of at-bats.

* Earned-run average--Multiply earned runs by nine and divide by innings pitched.

* Batting average--Divide the number of hits by the number of at-bats.

* Fielding average--Add the number of putouts and assists and divide by the total number of putouts, assists and errors.

* Magic number--Take the number of games remaining for the team in first place, add one and subtract the number of games ahead in the loss column.