Reproductive investment decisions form an integral part of life-history biology. Selection frequently favours plasticity in investment that can generate maternal effects on offspring development. For example, if females differentially allocate resources based on mate attractiveness or quality, this can create a non-genetic link between mate attractiveness and offspring fitness with potential consequences for ecological and evolutionary dynamics. It is therefore important to understand under what conditions differential investment into offspring in relation to male quality is expected to occur and the direction of the effect. Two opposite predictions, increased investment into offspring produced with high-quality mates ( differential allocation (DA)) and increased investment with low-quality males ( reproductive compensation ( RC)) have been suggested but no formal theoretical treatment justifying the assumptions underlying these two hypotheses has been conducted to date. Here, we used a state-based approach to investigate the circumstances under which the variation in mate quality results in differential female investment into offspring and how this interacts with female energetic resource levels. We found that a pattern of increased investment when mating with high-quality mates (i.e. DA) was the most common optimal investment strategy for females in our model. By contrast, increased investment when mating with low-quality mates (i.e. RC) was predicted only when the relative impact of parental investment on offspring quality was low. Finally, we found that the specific pattern of investment in relation to male quality depends on female energetic state, the likelihood for future mating opportunities and the expected future distribution of mate quality. Thus, the female's age and body condition should be important factors mediating DA and RC, which may help to explain the equivocal results of empirical studies.