We calculate the binding energies of donors bound toXvalleys in type‐II GaAs–AlAs quantum well structures using an anisotropic variational method which enables us to take into account the effective mass anisotropy and quantum confinement. For a comparative study, we use two sets of effective masses obtained from different measurements [B. Rheina¨nderetal. Phys. Status Solidi B49, K167 (1972) and M. Goiranetal., Physica B177, 465 (1992)]. We show that the binding energies have a pronounced dependence with the effective mass, AlAs layer thickness, and impurity position. ©1995 American Institute of Physics.