Structural stability, electronic, optical, and photovoltaic properties of pure and doped InP were evaluated by using first principles calculations via the density functional theory (DFT). The exchange-correlation potential is treated with generalized gradient approximation (GGA-PBE). Additionally, the Tran Blaha modified Becke-Johnson exchange potential (TB-mBJ) is employed, because it gives very accurate results of the band gap in solids. Our results reveal that all compounds are energetically and mechanically stable. It is found that for Y concentrations less than 30%, the favored structure is a Zinc blende-like one, while for Y concentrations greater than 30%, the favored structure is a NaCl-like structure. The substitution of In by Y is found to be able to enlarge the direct bandgap of about 34% (from 1.43 eV to 2.17 eV) and confirms the semiconductor behavior for zinc blende stable structures. The absorption coefficient is reasonably exceeding 105
cm
−for YxIn1-xP alloys in the case (x=0 and x=25%). The reflectivity shows less than 30% around the energy value of 2 eV and an efficiency of solar cell of 18% can be achieved for Y0.25In0.75P. Also, a thickness of L=1 μm is enough to confirm the experimental data. Regarding to the matching of lattice parameters (a mismatch < 4%) of InP and Y0.25In0.75P and the band gap energy difference made Y0.25In0.75P suitable for optoelectronic and photovoltaic devices in particularity as Tandem solar cells (Y0.25In0.75P/InP) and quantum well (Y0.25In0.75P/InP/Y0.25In0.75P) applications. In the absence of experimental works, our results can be useful for further studies.