Results are presented of a parametric study of the ideal magnetohydrodynamic stability properties of the spheromak, or compact torus, configuration. In the absence of a nearby conducting wall, the spheromak is always unstable to at least one current-driven mode. With a conducting wall at the surface, the spheromak can be unstable to current-driven modes if the current is too peaked, i.e. q0(R/a) < 2/3, or if the shear is too low at the origin. The Mercier criterion sets an upper limit on the pressure gradient everywhere, but configurations that are everywhere Mercier-stable can be unstable to pressure-driven low-n modes. Stable toroidal configurations exist with a spherical wall separated by half a minor radius, and with βθ = 30%.