We present a scheme for calculating coherent electron transport in atomic-scale contacts. The method combines a formally exact Green's function formalism with a mean-field description of the electronic structure based on the Kohn-Sham scheme of density functional theory. We use an accurate plane-wave electronic structure method to calculate the eigenstates which are subsequently transformed into a set of localized Wannier functions (WFs). The WFs provide a highly efficient basis set which at the same time is well suited for analysis due to the chemical information contained in the WFs. The method is applied to a hydrogen molecule in an infinite Pt wire and a benzene-dithiol (BDT) molecule between Au(111) surfaces. We show that the transmission function of BDT in a wide energy window around the Fermi level can be completely accounted for by only two molecular orbitals. (c) 2005 Elsevier B.V. All rights reserved.