  Odd index pairings of $K_1$-group elements with Fredholm modules are of
relevance in index theory, differential geometry and applications such as to
topological insulators. For the concrete setting of operators on a Hilbert
space over a lattice, it is shown how to calculate the resulting index as the
signature of a suitably constructed finite-dimensional matrix, more precisely
the finite volume restriction of what we call the spectral localizer. In
presence of real symmetries, secondary $\mathbb{Z}_2$-invariants can be
obtained as the sign of the Pfaffian of the spectral localizer. These results
reconcile two complementary approaches to invariants of topological insulators.
