The Mercier stability criterion is evaluated for various axisymmetric magnetohydrodynamic equilibria in a systematic study of the effects of shaping on the plasma critical β (volume averaged pressure over the vacuum toroidal field pressure at the center of the plasma chamber). Pressure profiles that are similar to those observed in tokamak experiments are used. Equilibrium parameters of interest are elongation, σ, and triangularity, δ, of D-shaped cross sections, aspect ratio, A, poloidal beta, βp, and pressure profile width, wp. Doublet plasmas with various σ are also included for completeness. It is shown that, for fixed plasma shapes, the critical β values increase strongly with increasing wp (typically by a factor of roughly 4), while for fixed values of wp the critical β values have a weaker dependence on plasma shaping (typically by a factor of roughly 2). The effectiveness of shaping (to increase β) decreases with decreasing wp, and for experimental values of wp (≲0.5) the best critical β values so determined is less than 6%. For fixed wp in D-shaped plasmas,it is shown that the highest critical β occurs around σ=1.65 and δ=0.5. The critical β values increase strongly with decreasing A. However, if the toroidal field is fixed at the coil surface at the distance between the coils and the plasma edge is greater than half the minor radius, the highest critical pressure occurs when A≳3-4. The doublet plasmas considered here with σ=3 give critical β values that are similar to those of the optimal D-shaped plasmas, when identical values of wp are used.