Calculating a baseball player's batting average is not a difficult task at all. A batting average represents the percentage of at bats that result in hits for a particular baseball player. The formula is:
Hits / At Bats = Batting Avg.
That's all there is to it. For example, if Justin Upton gets 155 hits in a season and has 554 at bats, his batting average would be 155/554, or .280. The batting average is usually represented not as a percentage (i.e. 28.0%), but instead as a decimal number with three places after the decimal. A batting average of 1.000 means that the player gets a hit every time he comes to bat, and an average of .000 means the player has no hits.
It should also be noted that not every time a batter comes to the plate counts as an at bat. Plate appearances that do not count as at bats include walks, hit-by-pitches, sacrifices, etc.
Here's one last example: Albert Pujols gets 35 hits in 113 at bats in May, so his batting average would be calculated as 35 divided by 113, which is .310 for the month of May.
Batting average is the percentage of at-bats that result in base hits.