  We present a formula that allows one to calculate the pion form factor in the
timelike region 2mpi <= sqrt{s} <= 4mpi in lattice QCD. The form factor
quantifies the contribution of two-pion states to the vacuum polarization. It
must be known very accurately in order to reduce the theoretical uncertainty on
the anomalous magnetic moment of the muon. At the same time, the formula
constitutes a rare example where, in a restricted kinematic regime, the
spectral function of a conserved current can be determined from Euclidean
observables without an explicit analytic continuation.
