Doing good feels good. Researchers call it the “warm glow.” Study upon study has confirmed its existence in most people, and now, a new one finds that when people do something nice for another person, the good feeling they get from it actually shows up in the brain.

Half of the people who showed up for a University of Zurich study were told they'd be given 25 Swiss francs to spend on themselves over the next few weeks; the other half were told that they should spend it on someone they knew. Each participant wrote down how they intended to spend the money, and, if they were in the “generous” group, the name of the person on whom they planned to spend the money.

It doesn’t take a lot to get a happiness boost from being generous.

Then participants were given brain scans and asked a series of questions about whether they’d make certain tradeoffs to give other people money — for instance, whether they’d give 20 francs to a friend at a cost of 15 francs to themselves. Not surprisingly, people who’d earlier committed to giving away money were more willing to make this kind of monetary sacrifice than people who’d committed to spending the money on themselves. Making a “public” pledge to generosity apparently nudges subsequent behavior in this direction as well.

When the team scanned the participants’ brains, they saw some striking differences in the brain regions that were activated. The part of the brain that processes prosocial behavior — the desire to help others with no expectation of reward — and generosity was more active in people choosing to be charitable, and its activity was more connected to an area of the brain that’s involved in happiness.

Just imagining a generous act activated these areas. “It is remarkable that intent alone generates a neural change before the action is actually implemented,” study author, Philippe Tobler, said in a news release.

Those participants in the “generous” group also rated themselves as happier after they’d made charitable decisions.

Perhaps the most important of the study's findings is that it doesn’t take a lot to get a happiness boost from being generous. People weren’t planning on giving away large sums of money or time — just a relatively small amount of money did the trick. “You don't need to become a self-sacrificing martyr to feel happier,” says Tobler. All it takes is being a little more generous. Just pledging to be generous seems to make people more charitable.

The results also provide some insights about marketing, especially from the perspective of nonprofits who are trying to tap into people’s generosity. Advertising how good donating money or time will make people feel may be an effective way to get people to act.

“Promising to behave generously could be used as a strategy to reinforce the desired behavior, on the one hand,” said Tobler, “and to feel happier, on the other.”

The study is published in Nature.