A semiempirical model for generating tungsten target x-ray spectra is presented. This model extends earlier work in two significant areas. First, both bremsstrahlung and characteristic x-ray production are assumed to occur at varying depths within the target. Second, optimal parameters for the model were determined from experimental spectra utilizing nonlinear least-squares techniques. As a result, good agreement is obtained between calculated and measured x-ray tube spectra and output for different target angles and a wide range of x-ray tube potentials. Such is not the case with previously published models.