The occupation of d orbitals controls the magnitude and anisotropy of the inter-atomic electron transfer in transition-metal oxides and hence exerts a key influence on their chemical bonding and physical properties. Atomic-scale modulations of the orbital occupation at surfaces and interfaces are believed to be responsible for massive variations of the magnetic and transport properties, but could not thus far be probed in a quantitative manner. Here we show that it is possible to derive quantitative, spatially resolved orbital polarization profiles from soft-X-ray reflectivity data, without resorting to model calculations. We demonstrate that the method is sensitive enough to resolve differences of ~3% in the occupation of Ni e(g) orbitals in adjacent atomic layers of a LaNiO(3)-LaAlO(3) superlattice, in good agreement with ab initio electronic-structure calculations. The possibility to quantitatively correlate theory and experiment on the atomic scale opens up many new perspectives for orbital physics in transition-metal oxides.