Using an extension of a first-principles method developed by King-Smith and Vanderbilt [Phys. Rev. B 49, 5828 (1994)], we investigate the effects of in-plane epitaxial strain on the groundstate structure and polarization of eight perovskite oxides: BaTiO3, SrTiO3, CaTiO3, KNbO3, NaNbO3, PbTiO3, PbZrO3, and BaZrO3. In addition, we investigate the effects of a nonzero normal stress. The results are shown to be useful in predicting the structure and polarization of perovskite oxide thin films and superlattices.