A theoretical method for calculating the energies and wave functions of an electron bound to a shallow donor in a semiconductor, subject to an applied magnetic field, is presented. This approach is particularly useful for describing highly excited Landau-like states, which cannot be dealt with properly using most other theoretical models. First, an adiabatic high-field approximation is used where mixing between different Landau-like states is neglected. Solving the one-electron Schrödinger equation is then reduced to finding solutions to a one-dimensional differential equation for motion along the field axis. We present results in which a finite-difference technique is used to solve this equation numerically. Values for the electron wave function at discrete points along the field axis are then determined. By calculating the discrete Fourier transform of this set of values, an analytical form for the wave function in terms of sines and cosines is obtained. These resultant wave functions are then used to calculate a Hamiltonian matrix in which mixing between different high-field states is included. Diagonalization of this matrix yields improved values for the energies of the impurity states. Where previous results exist, our results are compared with those of other theoretical approaches and from experiments on the donor in GaAs. The advantage of our approach is that it enables both energies and wave functions to be determined without any prior assumptions of the form of the wave function in the field direction. This includes expressions for highly excited states which are difficult to obtain by other means. The results demonstrate the validity of the present method of calculation. ͓S0163-1829͑98͒08315-5͔