The structural, elastic, electronic and optical properties of two novel phases Si3P4 with tetragonal and orthorhombic structures are studied by first-principles calculations according to density function theory (DFT). For novel structures t-Si3P4 and o-Si3P4, the elastic constants results show that they are mechanically stable. The phonon dispersion spectra confirm that they are dynamically stable. The forming enthalpies prove their thermodynamic stability. The mechanical properties, such as the bulk modulus B, shear modulus G, Pugh ratio k, Young’s modulus E and Poisson’s ratios [Formula: see text] are calculated. The results show that t-Si3P4 has better anti-deformation ability than o-Si3P4, and t-Si3P4 is harder than o-Si3P4. The Poisson’s ratio values of t-Si3P4 and o-Si3P4 are 0.16 and 0.35, and the Pugh ratio values, k, are 0.88 and 0.33. For t-Si3P4, the Pugh ratio k [Formula: see text] 0.57 indicates that it behaves in a brittle manner. For o-Si3P4, it owns the better plasticity. The directional dependence of the Young’s modulus indicates that o-Si3P4 is more anisotropic than t-Si3P4. The calculated band structures show that the two novel phases are semiconductors, and the narrow indirect bandgaps are 1.847 and 0.158 eV by using PBE0. The densities of states (DOS) indicate that the P ‘p’ and Si ‘p’ play major roles in two phases total DOS. The results of the optical properties, such as the dielectric functions, absorption spectra, loss functions, refractive index, and so on are given. The static dielectric constants are 5.493 and 12.206, the starting positions of the absorption spectra are approximately at 1.815 and 0.140 eV, and the peaks of loss functions are at 15.503 and 11.763 eV, for t-Si3P4 and o-Si3P4, respectively.