This study examined children's responses to targeted and collective punishment. Thirty‐six 4–5‐year‐olds and 36 6–7‐year‐olds (36 females; 54 White; data collected 2018–2019 in the United States) experienced three classroom punishment situations: Targeted (only transgressing student punished), Collective (one student transgressed, all students punished), and Baseline (all students transgressed, all punished). The older children evaluated collective punishment as less fair than targeted, whereas younger children evaluated both similarly. Across ages, children distributed fewer resources to teachers who administered collective than targeted punishment, and rated transgressors more negatively and distributed fewer resources to transgressors in Collective and Targeted than Baseline. These findings demonstrate children's increasing understanding of punishment and point to the potential impact of different forms of punishment on children's social lives.