The adage says it’s better to give than to receive. But is it really? The scientific evidence that generosity is good for us has been scant, even as the benefits of selfishness are obvious. Recently, however, a neurological study published in Nature Communications found there may be some biological truth to the maxim after all. The study showed that generosity changed the activity in people’s brains in ways that increase feelings of happiness, even if the generous act is small or only imagined.

Scientists at the University of Zurich and elsewhere began by recruiting 50 men and women and asking them to complete questionnaires about their current mood. They then were given 25 Swiss francs (about $25) once a week for the next month. Half of the 50 were asked to spend this on themselves. The other half were instructed to choose a new recipient each week on whom to spend the money. In other words, half the volunteers agreed to be selfish and the other half to be generous.

At the beginning of the study, participants slid into an fM.R.I. machine with a computer screen that flashed hypothetical scenarios involving monetary gifts to a loved one at a personal cost. The fM.R.I. recorded their brain activity as volunteers decided how they would react to each situation.

Afterward, the researchers again asked participants about their mood, especially happiness, and compared the results with the responses on the initial survey. Those who agreed to give away money reported feeling significantly happier than those who planned to spend it on themselves. They also made more generous choices during the fM.R.I. testing, agreeing to more scenarios that came at a personal cost. And their brains worked differently, too. When the study subjects who had pledged to spend money made generous picks, the fM.R.I. scans showed greater activity in a portion of the brain, the temporo-parietal junction, associated with altruism. And that portion of their brains was also showing greater functional connectivity, communicating more readily with another part of the brain, the ventral striatum, known as the brain’s reward center.