Nuptial gift-giving occurs in several taxonomic groups including insects, snails, birds, squid, arachnids and humans. Although this trait has evolved many times independently, no general framework has been developed to predict the conditions necessary for nuptial gift-giving to evolve. We use a time-in time-out model to derive analytical results describing the requirements necessary for selection to favour nuptial gift-giving. Specifically, selection will favour nuptial gift-giving if the fitness increase caused by gift-giving exceeds the product of expected gift search time and encounter rate of the opposite sex. Selection will favour choosiness in the opposite sex if the value of a nuptial gift exceeds the inverse of offspring processing time multiplied by the rate at which mates with nuptial gifts are encountered. Importantly, selection can differ between the sexes, potentially causing sexual conflict. We test these results using an individual-based model applied to a system of nuptial gift-giving spiders, Pisaura mirabilis, by estimating parameter values using experimental data from several studies. Our results provide a general framework for understanding when the evolution of nuptial gift-giving can occur, and also provide novel insight into the evolution of worthless nuptial gifts, which occur in multiple taxonomic groups with implications for understanding parental investment.