Classical two-sex discrete-time population projection models rely on mating functions developed for continuous-time frameworks that overestimate the number of unions between reproductive individuals. This has important consequences for our understanding of the evolution and demography of two-sex populations and consequently for prediction, management, and conservation. Here, we propose a novel mating function that is both robust - obeying all properties necessary to be ecologically valid - and flexible, accommodating all mating systems and efficiency in mating encounters. We illustrate the usefulness of this novel function with an application to the sexual dimorphic and polygynous wild boar. We show that the population growth rate depends on the harem size, the operational sex ratio and the encounter efficiency. This novel function can be applied to all types of mating systems and tactics and is highly relevant in the context of global changes where mating systems and encounter efficiency are expected to change.