I think your calculations are incorrect. PA = plate appearances. In baseball a Plate Appearance happens only on a hit, or an out. If he walks a PA is not recorded. Your software seems to want PA’s to include walks.
You are confusing Plate Appearances (PA) with At Bats (AB). AB's are calculated from PA's.
From this Wikipedia Article:
AB—At bat: Batting appearances, not including bases on balls, hit by pitch, sacrifices, interference, or obstruction.
PA—Plate appearance: number of completed batting appearances.