Abstract | When deciding whether and how to punish, people consider not only the potential direct consequences, but also, how their choice will affect observers’ judgements about the values and motives underlying the choice. We formalize the decision to punish as a rational communicative social action (RCSA). The model generates rational decisions to punish, incorporating anticipated observers’ judgements obtained from a recursive model of inference using an intuitive theory of mind. Using this model, we synthesize patterns of human punishment from recently published papers. RCSA thus offers a formal model of the cognitive process that humans use to balance preferences for how they are perceived, with other goals for punishing.