We report a combined experimental and theoretical study of Gundlach resonances Un in scanning tunneling spectroscopy at constant current over an exceptional range of energy and number, typically tens of an eV and over thirty in order n. By performing (1) three-dimensional electrostatic calculations, (2) WKB quantum calculations of the current, and (3) one-dimensional solutions of the Schrödinger equation along the perpendicular line from the surface to the tip apex, we provide a theoretical understanding and prediction of the experimental U(n) curve. Unlike commonly assumed, the triangular potential well is not found to be a good approximation for the high-n states. We show that although the spectroscopy mode assures a constant electric field at the tip apex, this leads only for the intermediate resonance states (approximately 2<n<6) to reside in a linear potential between the tip and the surface. Whereas the low lying (n <6) states all lie approximately in the same quantum well, at higher tip-sample distances d and bias voltages V(d), the quantum well is no longer triangular but attains a curvature, which is d dependent. Each high-n state resides in its own well that can be well-approximated by a polynomial of second order. Hence, the range of Un to be analyzed in terms of spectroscopic positions needs to be chosen with great care when deducing surface work functions.