Want good karma? Pay it forward. The other night, out to eat at our favorite Thai restaurant, a woman patron approached our table, coupon in hand. “I have this coupon for $5 off dinner but they won’t let me combine coupons, would you like it?”

Happy to be the chosen recipient of her pay it forward gesture in a very crowded restaurant, we quickly noticed there was another coupon attached for 10 percent off a meal. So when we exited, we also paid it forward, stopping by a family of four’s table and offering them the final coupon. Why does it feel good to pay it forward?

Drive-thru windows at Starbucks know the phenomena well. A pay it forward chain 378 cars deep was reported in St. Petersburg, Florida, in 2014, each car paying for the vehicle behind them. Tollbooth attendants also get in on the gig—what must it feel like to tell car after car that their toll was paid by the vehicle ahead of them?

Paying it forward, the phrase coined to imply a benefactor of a good deed who repays it to another instead of the original benefactor, may stretch back to 1916 when Lilly Hammond wrote the line “You don’t pay love back; you pay it forward” in her book “In the Garden of Delight.”

Nearly a hundred years later we saw social studies teacher Eugene Simonet (Kevin Spacey) assign his class a project to think of something to change the world and put it into action in the 2000 movie “Pay it Forward” (based on the 1999 novel of the same name). We were then witness to Trevor (Haley Joel Osment) whose mission consisted of doing good deeds for three people and asking only that they do a good deed for someone else, setting off a chain reaction he hoped could make the world better.

Think how observing someone buy a coffee for a stranger inspires you to pay it forward

So why are we compelled to pay it forward? One popular social theory suggests when you experience or witness an act of generosity you become socially duty-bound to do something nice for others.

A study published in the journal Plos One found that if you receive or observe a random act of generosity it significantly increases the likelihood you’ll be generous toward a stranger. However, when you witness a high level of generosity, your willingness to help falls off since you feel your help isn’t needed. Think how observing someone buy a coffee for a stranger inspires you to pay it forward, while watching someone buy everyone in the bar a round of drinks likely doesn’t.

Social scientists have conducted experiments demonstrating that the effect of a single random act of kindness ripples through a social network setting off chain reactions of generosity. In the Starbucks chain, the barista told reporters that the 379th car in the sequence likely didn’t understand the concept—or the power of paying it forward.

In a 2005 study, Stanford University psychologist Sonja Lyubomirsky asked students to carry out five weekly random acts of kindness, anything from buying a Big Mac for a homeless person to helping a younger sibling with homework. The results showed students had higher levels of happiness than a control group who hadn’t performed arbitrary acts of kindheartedness. What’s more, those that accomplished all five acts in a single day reaped the largest happiness boost—good karma, if you will.

Karma, the Sanskrit spiritual equivalent to Newton’s law of ‘every action must have a reaction’ typically translates in our modern minds to some universal ledger keeping track of all our good and bad goings on and tallying them to dole out their karmic equivalent. But Buddhists say the true meaning of karma is about intention. Intending to pay it forward by random acts of kindness and generosity may not bring the exact karmic retribution, but the good intention of paying it forward clearly heightens our inner happiness. I felt joyful giving the coupon to the family at the Thai restaurant.

Here’s the rub: generosity may or may not be contagious, and a universal ledger may or may not exist, but helping strangers can come with fringe benefits either way—showing family and friends how kind you can be to others, making your community stronger, feeling happier and maybe even changing the small social network that makes up your world.