Effort is aversive and often avoided—even when earning benefits for oneself— yet people sometimes work hard for others. How do people decide who is worth their effort? Prior work has found avoidance of physical effort for strangers. Here, we find people avoid cognitive effort for others relative to themselves, even when the cause is personally meaningful. We suggest that perceived overlap between self and other may underlie prosocial decisions involving effort. In two studies, participants repeatedly decided whether to invest cognitive effort to gain financial rewards for themselves and others. In Study 1, participants were less willing to invest cognitive effort for a charity they elected to support than themselves. In Study 2, participants were more willing to work cognitively for a charity than an intragroup stranger, but again preferred to think to earn rewards for themselves. Computational modeling suggests that, unlike physical effort, cognitive effort discounts the subjective value of rewards linearly. Participants varied in their willingness to invest prosocial effort. Follow-up machine learning analyses indicate that people who represented others more similarly to themselves were more willing to invest effort on their behalf. Our findings suggest that highlighting people’s similarities may be one way to promote prosocial effort.