  We present a model for the formation of the Magellanic Stream (MS) due to ram
pressure stripping. We model the history of the Small and Large Magellanic
Clouds in the recent cosmological past in a static Milky Way potential with
diffuse halo gas, using observationally motivated orbits for the Magellanic
Clouds derived from HST proper motions within the potential of the Milky Way.
This model is able to reproduce the trailing arm but does not reproduce the
leading arm feature, which is common for models of the stream formation that
include ram pressure stripping effects. While our model does not outperform
other models in terms of matching the observable quantities in the MS, it is
close enough for our ultimate goal -- using the MS to estimate the MW mass.
From analyzing our grid of models, we find that there is a direct correlation
between the observed stream length in our simulations and the mass of the Milky
Way. For the observed MS length, the inferred Milky Way mass is $1.5 \pm 0.32
\times 10^{12}$ $M_\odot$, which agrees closely with other independent measures
of the Milky Way mass. We also discuss the MS in the context of HI streams in
galaxy clusters, and find that the MS lies on the low-mass end of a continuum
from Hickson groups to the Virgo cluster. As a tracer of the dynamical mass in
the outer halo, the MS is a particularly valuable probe of the Milky Way's
potential.
