We have developed a Kramers–Kronig consistent analytical expression to fit the measured optical functions of hydrogenated amorphous silicon (a-Si:H) based alloys, i.e., the real and imaginary parts of the dielectric function (Є1,Є2) (or the index of refraction n and absorption coefficient α) versus photon energy E for the alloys. The alloys of interest include amorphous silicon–germanium (a-Si1-xGex:H) and silicon–carbon (a-Si1-xCx:H), with band gaps ranging continuously from ∼1.30 to 1.95 eV. The analytical expression incorporates the minimum number of physically meaningful, E independent parameters required to fit (Є1,Є2) versus E. The fit is performed simultaneously throughout the following three regions: (i) the below-band gap (or Urbach tail) region where α increases exponentially with E, (ii) the near-band gap region where transitions are assumed to occur between parabolic bands with constant dipole matrix element, and (iii) the above-band gap region where (Є1,Є2) can be simulated assuming a single Lorentz oscillator. The expression developed here provides an improved description of Є2 (or α) in the below-band gap and near-band gap regions compared with previous approaches. Although the expression is more complicated analytically, it has numerous applications in the analysis and simulation of thin film a-Si:H based p-i-n and n-i-p multilayer photovoltaic devices. First, we describe an approach whereby, from a single accessible measure of- the optical band gap, the optical functions can be generated over the full solar spectrum for a sample set consisting of the highest quality intrinsic a-Si:H based alloys prepared by plasma-enhanced chemical vapor deposition using the principle of maximal H2 dilution. Second, we describe quantitatively how such an approach can be modified for sample sets consisting of lower quality alloy materials. Finally, we demonstrate how the generated optical functions can be used in simulations of the absorption, reflection, and quantum efficiency spectra of a-Si:H based single-junction and multijunction solar cells. © 2002 American Institute of Physics.