The 8-band kp Hamiltonian is applied to calculate electronic band structure and material gain in dilute nitride quantum wells (QWs) grown on InP substrate. Three N-containing QW materials (GaInNAs, GaNAsSb, and GaNPSb) and different N-free barriers (GaInAs, GaAsSb, GaPSb, AlGaInAs, GaInPAs, AlGaAsSb, GaPAsSb, and AlGaPSb) lattice matched to InP are analyzed. It is shown that Ga0.17In0.83NyAs1-y-QWs with Ga0.47In0.53As, Al0.23Ga0.24In0.53As, or Ga0.17In0.83P0.63As0.37 barriers are a very good gain medium for long-wavelength lasers grown on InP substrates. For N-free QWs the transverse electric (TE) mode of the material gain develops at at 2.1µm. This gain peak shifts towards longer wavelengths upon the incorporation of nitrogen and reaches the wavelength of ~2.8µm for 3% N. For GaNyAs0.26-ySb0.74-QWs no quantum confinement or very weak quantum confinement exist for electrons in Nfree QWs with the ternary barrier (i.e., GaAs0.51Sb0.49) and quaternary (Al0.23Ga0.77As0.51Sb0.49 and GaP0.25As0.15Sb0.60) barriers, respectively. However, the quantum confinement in the conduction band strongly increases after incorporation of nitrogen. For GaNyAs0.26-ySb0.74-QWs with 3% N gain peak for TE mode exists at 3.2 µm. Very similar changes in electronic band structure and material gain are noticed for GaNyP0.26-ySb0.74-QWs with GaP0.35Sb0.65, Al0.23Ga0.77As0.52Sb0.48, and GaP0.25As0.15Sb0.60 barriers. In that case gain peak (TE mode) for GaN0.03P0.23Sb0.74-QW with GaP0.35Sb0.65 barrier is at 3.6 µm. The intensity and the shape of material gain spectra in the three QW system vary with changes of the nitrogen concentration and the barrier content. At carrier concentration of 510 18 cm -3 the largest material gain exists for Ga0.17In0.83NyAs1-y-QWs with Al0.23Ga0.24In0.53As and Ga0.17In0.83As0.37Ga0.63 barriers.