You can't always get what you want—the car is too expensive, the restaurant already full, your favorite snack sold out—but you can do your best to choose the next most appealing option. Research suggests that when making that second choice, you might end up happier if you go for something very different from what you originally wanted.

In a series of studies published in May in Psychological Science, researchers probed participants' preferences by tempting them with gourmet chocolate. The scientists let subjects taste the fancy brand and then offered them a choice between a similar substitute (store-brand chocolate-covered peanuts) and a radically different substitute (a granola bar). Another set of participants got the same setup, but they were allowed to try both options before choosing. In the first experiment, 73 percent chose the generic chocolate, but in the second experiment, only 52 percent did—more participants presumably had realized they would be happier with the granola bar.

In an additional experiment, participants were assigned to eat some gourmet chocolate or a bite of either substitute, and then they were asked how much they still craved the original fancy chocolate. Those who ate the store-brand chocolate ended up craving the gourmet version more than those who ate the granola bar. In fact, those who ate the granola bar craved the gourmet chocolate no more than those who ate the fancy chocolate itself.

The fact that the similar substitute was less satisfying and left a stronger residual craving suggests the existence of a “negative contrast effect,” according to the researchers. “A poor replacement is worse in terms of ultimate satisfaction than something completely different that serves the same purpose,” explains Carey K. Morewedge, an associate professor of marketing at the Boston University School of Management and senior author of the study.

The finding is useful for people on restricted diets. Yet researchers also think this psychological phenomenon probably applies to a lot more than just food. The next time you find yourself in a situation where the thing you really want is not available, try a wildly different option and enjoy it without a second thought.