In this article, we present results of the first-principle study of the structural, electronic, and optical properties of the InN, InP binary compounds and their related ternary alloy InN x P 1– x in the zinc-blend (ZB) phase within a nonrelativistic full potential linearised augmented plan wave (FP-LAPW) method using Wien2k code based on the density functional theory (DFT). Different approximations of exchange–correlation energy were used for the calculation of the lattice constant, bulk modulus, and first-order pressure derivative of the bulk modulus. Whereas the lattice constant decreases with increasing nitride composition x . Our results present a good agreement with theoretical and experimental data. The electronic band structures calculated using Tran-Blaha-modified Becke–Johnson (TB-mBJ) approach present a direct band gap semiconductor character for InN x P 1– x compounds at different x values. The electronic properties were also calculated under hydrostatic pressure for ( P =0.00, 5.00, 10.0, 15.0, 20.0, 25.0 GPa) where it is found that the InP compound change from direct to indirect band gap at the pressure P ≥7.80 GPa. Furthermore, the pressure effect on the dielectric function and the refractive index was carried out. Results obtained in our calculations present a good agreement with available theoretical reports and experimental data.