A few weeks ago psychologist Dan Ariely, inspired by the holiday frenzy, pondered the hows and whys of gift-giving. Reading his piece—an endorsement of a behavioral economics view that challenges the rational economic contention that gift-giving is a largely irrational dilemma—at once brought to mind the story that has to me (and, I suspect, to many others) always epitomized the spirit of gifts and generosity: O. Henry’s “The Gift of the Magi.”

Only a few pages long, the story may be O. Henry’s most famous, its title almost a byword for a certain type of present. Say it, and chances are people will at once realize just what kind of gift you mean. A gift that is the real embodiment of quality over quantity, the value of thought over any amount of expenditure. A gift that puts the mere mention of a Holiday Wish List to shame. As O. Henry writes, “Eight dollars a week or a million a year—what is the difference? A mathematician or a wit would give you the wrong answer….Two foolish children in a flat who most unwisely sacrificed for each other the greatest treasures of their house. But in a last word to the wise of these days let it be said that of all who give gifts these two were the wisest.”

Recent work suggests that O. Henry may have been more right than he knew. The gifts that Della and Jim gave to one another may have actually been the wisest even from the most rational—at least in the evolutionary sense—of views, despite the fact that for a homo economicus, their value would have been worse than nothing, as bad an economic exchange as could be expected: humans may be wired to be overly generous, and that proclivity can actually confer a large survival advantage.

A group of psychologists from UC-Santa Barbara set out to test the long-standing conundrum that even in anonymous, one-shot games—in other words, in situations where you know that (1) you will never again encounter your partner and (2) no one has any idea what decision you’ve made—people more often than not choose to incur costs themselves in order to allocate benefits to others; an irrational behavior by traditional economic standards if ever there was one. In their model, the team managed to isolate an asymmetry that had previous been ignored: in an uncertain world, it is far more costly to incorrectly identify a situation as one-shot when it is in fact repeated than it is to mistake an actual one-shot encounter for a repeated one. Put differently, it is better to always assume that we will in fact encounter the same partners over and over. So costly is it to make a mistake in the opposite direction that, even absent any reputational or other mechanisms, it makes sense for us to behave generously to anyone we encounter. As the study authors conclude, “Generosity evolves because, at the ultimate level, it is a high-return cooperative strategy…even in the absence of any apparent potential for gain. Human generosity, far from being a thin veneer of cultural conditioning atop a Machiavellian core, may turn out to be a bedrock feature of human nature.”

So, it makes perfect sense for us to be as generous as we can. In fact, we may even like giving gifts more than we like receiving them—Jim’s joy at seeing Della’s happiness at her present was likely greater than his enjoyment of his own gift, and the opposite holds true for Della. In one study, subjects were given the choice to receive a very tangible material benefit to themselves—up to $128—or to donate money to a range of charities. Each charitable donation would decrease their own monetary endowment, while each choice that focused on their monetary interest would maintain their earnings.

Not only did the researchers find that all participants consistently chose to engage in costly donations, anonymously giving up an average of 40% of their endowment (around $51) for charity, but they also discovered surprising differences in neural activity for decisions that involved donating money versus receiving money. Specifically, while monetary rewards activated the mesolimibic reward system, including the dorsal and ventral striatum and the ventral tegmental area—as would be expected of something that gives us positive reward—when people donated money to a charity, the same network showed even greater activity—and the activity spread to the subgenual area (implicated in social attachment), which had remained inactive in the pure monetary reward choices. While we may not always agree, our brains seem to suggest that the joy of being a gift's giver may eclipse that of being its recipient.

But “The Gift of the Magi”—and Ariely’s point—goes beyond simple generosity, to the thought that lies behind the gift itself. The act of giving is itself part of the gift, to be sure, but giving thoughtlessly is not enough. The actual value of a gift—which, in the story, ends up being negative in the immediate term to both Jim and Della—stems from the calculation which went into its choice: what will it actually mean to the recipient?

Ariely singles out this type of gift as one that makes the mental leap from your own vantage point to that of someone else. It’s a leap that is incredibly difficult to take—exhibiting empathy, let alone perfect empathy to the point of complete confluence with the mind of another person, is a tough feat even in the most conducive of circumstances—but that may be worth taking all the same. For, even if you fail to make it as accurately as you may have wanted, the effort will be noted. The actual accuracy is somewhat beside the point. What matters is that you try to make the shift from your own mindset to someone else’s, that you make the effort to think about what present would be best suited to another person. It’s a generosity that presupposes generosity of time, not just of material expenditure: you may not have thought it out quite correctly, but at least you’ve taken the time to think.

True, a time investment may seem not worth the hassle. After all, isn’t it easier to just ask what someone wants, or go online to check what they want, and leave it at that? Won’t everyone be better off? Not necessarily. Generosity of time and thought may actually pay off in more ways than we think. Not only is the gift recipient likely to be appreciative, but we ourselves may benefit. Generosity—which in this definition actually includes generosity of time and generosity that is both unexpected and spontaneous (in stark contrast to the list-variety of present)—is one of the top three predictors of a successful marriage, a surprising addition to the expected culprits, sexual intimacy and commitment. It can make us feel better about ourselves. It can help us actually be happier and see the world as an overall better place. In short, it might be an initial investment that is worth making.

And, at the end of the day, it may well go further than any “ideal” present that was purchased off of an Amazon Wish List but required no actual thought of your own ever could. If Jim and Della had both officially requested their gift, they may have avoided the result of their overly generous impulses, but the effect would have been taken away entirely. The sheer fact of verbalizing the desire would have taken the resulting gifts out of the Magi realm altogether. As Ariely puts it, “Instead of picking a book from your sister's Amazon wish list, or giving her what you think she should read, go to a bookstore and try to think like her. It's a serious social investment.”

Giving—and thoughtful, generous giving at that—may be more rewarding than receiving on numerous levels, from the neural, to the personal, to the social. And would a more generous, so to speak, gift be even more rewarding than a less generous one? While that remains to be tested directly, I’d be willing to bet that Jim and Della’s ventral tegmental area and striatum went all sorts of crazy when they picked out one another’s presents. And isn’t it just the type of gift you’d most want to receive yourself?