  A simplified analytical form of the on-axis magnetic well and Mercier's
criterion for interchange instabilities for arbitrary three-dimensional
magnetic field geometries is derived. For this purpose, a near-axis expansion
based on a direct coordinate approach is used by expressing the toroidal
magnetic flux in terms of powers of the radial distance to the magnetic axis.
For the first time, the magnetic well and Mercier's criterion are then written
as a one-dimensional integral with respect to the axis arclength. When compared
with the original work of Mercier, the derivation here is presented using
modern notation and in a more streamlined manner that highlights essential
steps. Finally, these expressions are verified numerically using several
quasisymmetric and non-quasisymmetric stellarator configurations including
Wendelstein 7-X.
