The conductance of nanoscale structures can be conveniently related to their scattering properties expressed in terms of transmission and reflection coefficients. Wave function matching (WFM) is a transparent technique for calculating transmission and reflection matrices for any Hamiltonian that can be represented in tight-binding form. A first-principles Kohn–Sham Hamiltonian represented on a localized orbital basis or on a real space grid has such a form. WFM is based upon direct matching of the scattering-region wave function to the Bloch modes of ideal leads used to probe the scattering region. The purpose of this paper is to give a pedagogical introduction to WFM and present some illustrative examples of its use in practice. We briefly discuss WFM for calculating the conductance of atomic wires, using a real space grid implementation. A tight-binding muffin-tin orbital implementation very suitable for studying spin-dependent transport in layered magnetic materials is illustrated by looking at spin-dependent transmission through ideal and disordered interfaces.