That formula will give you the total number of stereoisomers, which includes enantiomers and all possible diastereomers. the number of diastereomers and enantiomers is not necessarily equal. An enantiomer is defined by its relationship to its mirror image, while a diastereomer is not. Suppose you have three chiral centers in a molecule. Pick one stereoisomer and you have one enantiomer of that compound and the rest of the stereoisomers are diastereomers relative to the compound you picked (in this case, 6 of them).
Also note that this formula only holds if there are no meso diastereomers. If there is a meso form, then you subtract one.