In this paper, the computational and practical aspects of a realistically-shaped multilayer model for the conductivity geometry of the human head are discussed. A novel way to handle the numerical difficulties caused by the presence of the poorly conducting skull is presented. Using our method, both the potential on the surface of the head and the magnetic field outside the head can be computed accurately. The procedure was tested with the multilayer sphere model, for which analytical expressions are available. The method is then applied to a realistically-shaped head model, and it is numerically shown that for the computation of B, produced by cerebral current sources, it is sufficient to consider a brain-shaped homogeneous conductor only since the secondary currents on the outer interfaces give only a negligible contribution to the magnetic field outside the head. Comparisons with the sphere model are also included to pinpoint areas where the homogeneous conductor model provides essential improvements in the calculation of the magnetic field outside the head.