Studies of flux anomalies statistics and perturbations in stellar streams have the potential to constrain models of warm dark matter ( WDM ) , including sterile neutrinos . Producing these constraints requires a parametrization of the WDM mass function relative to that of the cold dark matter ( CDM ) equivalent . We use five WDM models with half-mode masses , M _ { \mathrm { hm } } = [ 1.3 , 35 ] \times 10 ^ { 8 } \mathrm { M _ { \sun } } , spread across simulations of the Local Group , lensing ellipticals and the z = 2 universe , to generate such a parametrization : we fit parameters to the functional form n _ { \mathrm { WDM } } / n _ { \mathrm { CDM } } = ( 1 + ( \alpha M _ { \mathrm { hm } } / M _ { X } ) ^ { \beta } ) ^ { \gamma } . For M _ { X } \equiv virial mass of central halos we obtain \alpha = 2.3 , \beta = 0.8 , and \gamma = -1.0 , and this fit is steeper than the EPS formalism predicts . For M _ { X } \equiv mass of subhalos we instead obtain \alpha = 4.2 , \beta = 2.5 and \gamma = -0.2 ; in both mass definitions the scatter is \sim 20 per cent . However , we caution that robust constraints will require bespoke simulations and a careful definition of halo mass , particularly for subhalos of mass < 10 ^ { 8 } \mathrm { M _ { \sun } } .