A first-principle approach allows the study of relaxed structural models for surfaces and interfaces. This is a powerful tool for the study of the local bonding. The utility of the first-principle theory is substantially extended through the calculation of core-level shifts. Such results can be used in conjunction with measured photoemission spectra to make progress in understanding the local atomic structure at interfaces. We review the quantitative comparison of the calculated core level shifts with experiment for a series of molecules. We then describe results for the Si(001)-SiO2 interface.