A Dirac operator on a complete manifold is Fredholm if it is invertible outside a compact set. Assuming a compact group to act on all relevant structure, we express the equivariant index of such a Dirac operator as an Atiyah-Segal-Singer type contribution from inside this compact set, and a contribution from outside this set. Consequences include equivariant versions of the relative index theorem of Gromov and Lawson and the Atiyah-Patodi-Singer index theorem.