  An analytic expression is derived for the leading finite-volume effects
arising in lattice QCD calculations of the hadronic-vacuum-polarization
contribution to the muon's magnetic moment, $a_\mu^{\text{HVP,LO}} \equiv
(g-2)_\mu^{\text{HVP,LO}}/2$. For calculations in a finite spatial volume with
periodicity $L$, $a_\mu^{\text{HVP,LO}}(L)$ admits a transseries expansion with
exponentially suppressed $L$ scaling. Using a Hamiltonian approach, we show
that the leading finite-volume correction scales as $\exp[- M_\pi L]$ with a
prefactor given by the (infinite-volume) Compton amplitude of the pion,
integrated with the muon-mass-dependent kernel. To give a complete quantitative
expression, we decompose the Compton amplitude into the space-like pion form
factor, $F_\pi(Q^2)$, and a multi-particle piece. We determine the latter
through NLO in chiral perturbation theory and find that it contributes
negligibly and through a universal term that depends only on the pion decay
constant, with all additional low-energy constants dropping out of the
integral.
