  We present an extension of the GM2Calc software to calculate the muon
anomalous magnetic moment ($a_\mu^{\text{BSM}}$) in the Two-Higgs Doublet
Model. The Two-Higgs Doublet Model is one of the simplest and most popular
extensions of the Standard Model. It is one of the few single field extensions
that can give large contributions to $a_\mu^{\text{BSM}}$. It is essential to
include two-loop corrections to explain the long standing discrepancy between
the Standard Model prediction and the experimental measurement in the Two-Higgs
Doublet Model. The new version GM2Calc 2 implements the state of the art
two-loop calculation for the general, flavour violating Two-Higgs Doublet Model
as well as for the flavour aligned Two-Higgs Doublet Model and the type I, II,
X and Y flavour conserving variants. Input parameters can be provided in either
the gauge basis or the mass basis, and we provide an easy to use SLHA-like
command-line interface to specify these. Using this interface users may also
select between Two-Higgs Doublet Model types and choose which contributions to
apply. In addition, GM2Calc 2 also provides interfaces in C++, C, Python and
Mathematica, to make it easy to interface with other codes.
