This contains data, materials, and code for the publication titled "Children's understanding of counterfactual and temporal relief" in JECP (2022) by Johnston, McCormack, Graham, Lorimer, Beck, Hoerl, and Feeney. This study represents the first body of work to investigate the development of children’s understanding of temporal relief and compare it with their understanding of counterfactual relief. Across four experiments (407 children aged 4–11 years and 60 adults; 52% female), we examined children’s ability to attribute counterfactual and temporal relief to others. In Experiment 1, 7- to 10-year-olds typically judged that two characters would feel equally happy despite avoiding or enduring an event that was unpleasant for one character. Using forced-choice procedures, Experiments 2 to 4 showed that a fledgling ability to attribute relief to others emerges at 5 to 6 years of age and that the tendency to make these attributions increases with age. The experiments in this study provide the first positive evidence in the literature as to when children can begin to attribute both counterfactual and temporal instances of relief to others. Overall, there was little evidence for separate developmental trajectories for understanding counterfactual and temporal relief, although in Experiment 4 there was an indication that, under scaffolded contexts, some children find it easier to attribute counterfactual relief rather than temporal relief to others.