The first-principles calculations in the combination of hybrid density functional theory (DFT) and multiconfigurational quantum-chemical methods are carried out to investigate geometric structures, electronic structures and 4f → 5d transitions of Ce3+ ions at mixed Ca2+/Y3+ sites in the CaYAlO4 (CYAO). The most energetically stable unit cell among three nonequivalent configurations is firstly determined according to the total energies from DFT calculations. The calculated defect formation energies of lanthanide dopants and complexes in the host (with relatively stable configurations) then reveal the preferred substitution of Ce3+ ions in the host. Moreover, the energies and relative oscillator strengths of the 4f → 5d transitions of Ce3+ at both Ca2+ and Y3+ sites are derived from the embedded-cluster quantum-chemical calculations at the CASSCF/CASPT2/RASSI−SO level. By comparison, the excitation bands in the experimental spectra of Ce3+-doped CYAO phosphors are mainly attributed to 4f → 5d transitions of Ce3+ ions at Ca2+ sites, which is well consistent with the conclusions attained from the calculations on defect formation energies. The computational framework presented in this study is beneficial to identify the occupation sites of lanthanide ions and assign the excitation bands of the experimental spectra for the phosphors with mixed sites or solid-solution structures.