The ability to learn from past experiences to inform future decision-making is crucial for humans and animals alike. One question with important implications for adaptive decision-making is whether we learn about the absolute values of cues we encounter (how good or bad?), or about their relative values (how much better or worse than the alternative?). Humans have been shown to use relative value learning, even when it leads to suboptimal decisions. In this study, we ask whether insects use absolute or relative value learning. Using the larvae of the fruit fly Drosophila melanogaster, we designed associative odour-taste learning experiments to distinguish both kinds of learning and find that larvae learn about the relative rather than the absolute values of both rewards and punishments, irrespective of the number and sequence of training trials. This suggests that relative value learning is a facility shared across the animal kingdom from maggots to humans, and can be realized even by simple insect brains. Given the great potential of D. melanogaster as a model organism for in-depth neurobiological analyses, our study opens up the opportunity to reveal the mechanism underlying relative value learning in unprecedented detail.