It's all about the numbers

 
Calculating Statistics
Many people like to calculate player statistics.  I'm not one of them, but I decided to add a page about it anyway.  I will use the following symbols in calculating the statistics: 
(+) addition, (-) subtraction, (*) multiplication, and (/) division.
 

Offensive Statistics

Base-on-balls Percentage
(total walks) / (plate appearances)
Batting Average
(total hits) / (official at-bats)

At-bats do not include walks, sacrifice flies, sacrifice bunts, obstruction calls, catcher's interference, or being hit by a pitch.  If a player makes it safely on base due to an error, it is an at-bat, but not a hit.

Home Run Ratio
(at-bats) / (home runs)
On-base Percentage
(hits + walks + hits by pitch) / (at-bats + walks + hits by pitch + sacrifice flies)
Slugging Average
(total bases) / (at-bats)

The number of total bases only includes those obtained from hits; not from errors, walks, or interference calls.

Stolen Base Percentage
(stolen bases) / (total attempts)
Strikeout Ratio
(at-bats) / (strikeouts)
 
Defensive Statistics
Fielding Average
(total putouts + assists) / (putouts + assists + errors)
 
Pitching Statistics
Earned Run Average
(earned runs * 9) / (innings pitched)
Opponents' Batting Average
(hits allowed) / (at bats allowed)
Winning Percentage
(games won) / (games won + games lost)
 
Team Statistics
Won-Lost Percentage
(wins) / (wins + losses)
 
Other Statistics   (The "unofficial" statistics)
Fielder's Range Factor
(putouts + assists) / (games)
Runs Created
[(hits + walks - caught stealing) * (total bases + (stolen bases * 0.55)] /
(at-bats + walks)