Research on distributive justice indicates that preschool-age children take issues of equity and merit into account when distributing desirable items, but that they often prefer to see desirable items allocated equally in third-party tasks. By contrast, less is known about the development of retributive justice. In a study with 4- to 10-year-old children (n = 123) and adults (n = 93), we directly compared the development of reasoning about distributive and retributive justice. We measured the amount of rewards or punishments that participants allocated to recipients who differed in the amount of good or bad things they had done. We also measured judgments about collective rewards and punishments. We found that the developmental trajectory of thinking about retributive justice parallels that of distributive justice. The 4- to 5-year-olds were the most likely to prefer equal distributions of both rewarding and aversive consequences; older children and adults preferred deservingness-based allocations. The 4- to 5-year-olds were also most likely to judge collective rewards and punishments as fair; this tendency declined with increasing age. Our results also highlight the extent to which the notion of desert influences thinking about distributive and retributive justice; desert was considered equally when participants allocated reward and punishments, but in judgments about collective discipline, participants focused more on desert in cases of punishment compared with reward. We discuss our results in relation to theories about preferences for equality versus equity, theories about how desert is differentially weighed across distributive and retributive justice, and the literature on moral development and fairness.