We introduce a method to test theoretical models for the layer dependence of exchange coupling constants in ultrathin magnetic films. The method is based on the observation of high-energy and high-momentum standing spin wave modes using high-resolution electron energy loss spectroscopy. Experimental data are presented for 5-8 layers of fcc cobalt deposited on Cu(100). The power of the method is illustrated by comparison to two theoretical studies predicting rather different results concerning the ratio of the interlayer and intralayer exchange coupling constants near the surface. Only the theory with a large interlayer coupling shows sufficient energy spreading in the layer dependence of the dispersion curves to match the experimental data. We furthermore discuss the reason for the surprising success of the simple nearest-neighbor Heisenberg model with a single exchange constant matched to experiment.