We describe a two-dimensional model for quantum-well lasers that solves self-consistently the electrical and optical equations. The model includes a wavelength-and position-dependent gain function which is derived from a quantum-mechanical calculation. We have also incorporated the effects of strain into the model, through an anisotropic parabolic band approximation of the band structure from a Luttinger-Kohn k.p theory. With this model we are able to predict the lasing characteristics such as the light-current behavior, current and optical field distributions, as well as the optical gain, spontaneous emission rate and dependence of the characteristics on geometry and layer design. Examples of the utility of our approach are shown which, for instance, clearly show the benefit of strain to laser design.