We calculate Total Bases (TB) the same way the MLB defines total bases:
Total bases refer to the number of bases gained by a batter through his hits. A batter records one total base for a single, two total bases for a double, three total bases for a triple and four total bases for a home run. A player can only add to his total-bases tally through a hit. Advancing on the basepaths -- even via a steal -- has no impact on a player's total bases.
Source: Official MLB Glossary