The structural, electronic and optical properties of InxGa1-xAs. GaAs1-yPy ternary and InxGa1-xAs1-yPy quaternary semiconductor alloys are investigated using first-principles plane-wave pseudo-potential method within the LDA approximations. For these alloys lattice parameters, bulk modulus, band gap energy and density of states are calculated. Besides, we have calculated the optical parameters (dielectric functions, energy loss function, reflectivity, absorption and refractive index) of these semiconductor alloys. Our results agree well with the available theoretical and experimental data in the literature. (C) 2010 Elsevier B.V. All rights reserved.