The effect of six potential contaminants (Cu, In, Ga, Se, Sn, and Zn) and five potential dopants (Ti, Mn, Sc, V, and Y) on the electronic and optical properties of molybdenum oxide (MoO 3 ) contact layers for solar cells was investigated using point defect analysis based on density functional theory simulations. Of the contaminants investigated, Sn, In, and Ga were found to be highly insoluble at all relevant temperatures and pressures and therefore not a concern for solar cell manufacturing. Zn, Cu, and Se exhibit some solubility, with the latter two appearing to introduce detrimental defect states near the valence band. This contamination can be avoided by increasing the O 2 partial pressure during MoO 3 deposition. Of the five potential aliovalent dopants, Sc, Ti, and Y were disregarded because of their limited solubility in MoO 3 , whereas V was found to be highly soluble and Mn somewhat soluble. The effect of Mn and V doping was shown to be strongly dependent on the O 2 partial pressure during deposition, with a high pO 2 favoring the formation of substitutional defects (potentially beneficial in the case of Mn doping because of the addition of defect states near the conduction band), whereas low pO 2 favoring interstitial defects.