The quantum states of interacting electrons in a quantum dot in a magnetic field are calculated and the effects of corrections to the 2D parabolic model are examined. The quantum states are obtained by a new method which involves three steps: first the electrostatic potential of the device is obtained from a solution of the Poisson equation, next this potential is used together with a combination of variational and Hartree–Fock calculations to obtain an orthogonal basis whose low-lying states are localised in the region of the dot and finally this basis is used to perform an exact diagonalization. Special attention is paid to the effect of motion perpendicular to the ideal 2D plane and the effect of screening of the Coulomb interaction by metallic electrodes close to the dot. Both effects result in a weakened effective interaction and increase the magnetic fields at which ground-state transitions occur.