The geometric and electronic structures of MoO3 and MoO2 have been calculated using the generalized gradient approximation to density functional theory. The calculated cross-section weighted densities of states are compared with high-resolution X-ray photoemission spectra. There is very good agreement between the calculated structures and those determined previously by X-ray diffraction and between the computed densities of states and the present photoemission measurements. MoO2 is shown to be a metallic material, as is found experimentally, but the Fermi level sits in a distinct trough in the density of states. Satellite peaks found in core photoemission spectra of MoO2 are shown to derive from final state screening effects in this narrow band metallic material.