Reproductive males face a trade-off between expenditure on precopulatory male–male competition—increasing the number of females that they secure as mates—and sperm competition—increasing their fertilization success with those females. Previous sperm allocation models have focused on scramble competition in which males compete by searching for mates and the number of matings rises linearly with precopulatory expenditure. However, recent studies have emphasized contest competition involving precopulatory expenditure on armaments, where winning contests may be highly dependent on marginal increases in relative armament level. Here, we develop a general model of sperm allocation that allows us to examine the effect of all forms of precopulatory competition on sperm allocation patterns. The model predicts that sperm allocation decreases if either the “mate-competition loading,”a, or the number of males competing for each mating, M, increases. Other predictions remain unchanged from previous models: (i) expenditure per ejaculate should increase and then decrease, and (ii) total postcopulatory expenditure should increase, as the level of sperm competition increases. A negative correlation between a and M is biologically plausible, and may buffer deviations from the previous models. There is some support for our predictions from comparative analyses across dung beetle species and frog populations.