Sperm length varies considerably amongst closely related species and the variation can be positively related to interspecific variation in the risk of sperm competition. In addition, a comparative study has shown that traits involved in sexual selection may often be sex linked. This study examined the quantitative genetics of sperm length in the yellow dung fly Scathophaga stercoraria (L.). There was a significant heritability of sperm length, h2 = 0.673. In addition, a significant non-linear epistatic interaction between determinants on the X chromosome and on the autosomes was identified in a three-generation breeding experiment. The ratio of the additive to epistatic components was approx. 5 : 1, though this is probably an overestimate, and the total proportion of the variance in sperm length accounted for by these genetic factors was > 80%. I argue that selection acting in both males and females is relevant for the evolution of this trait.