It’s an old saying in real estate: Want a pricey house? Find a cheap grocery store.

You’re right, that’s not a saying at all. But according to a new study from RealtyTrac, released this week, there’s some truth to it. For your home to yield the best return on investment, it’s better to own near Trader Joe’s, the much-loved, budget-minded grocery chain, than it is to own near Whole Foods, its pricey yet equally beloved rival. But there’s a catch: sitting on that goldmine of heady real estate prices and cheap smoked Gouda generally comes with higher property taxes.

Researchers at RealtyTrac analyzed millions of homes in zip codes with at least one Trader Joe’s (but no Whole Foods) and in zip codes with at least one Whole Foods (but no Trader Joe’s). On average, Homeowners near a Trader Joe’s have seen the value of their homes increase 40 percent since they purchased them; Whole Foods-adjacent property owners saw prices increase 34 percent, in line with the national average.

Joe’s homes (if I may) were also worth more, averaging $592,339 in price – 5 percent higher than those near a Whole Foods.

However, those lucky homeowners also tend to pay a lot more in property taxes than their peers. The average US homeowner pays $3,239 annually in property taxes. Owners near a Whole Foods pay $5,382, and those near a Trader Joe’s pay $8,536 – 59 percent higher than those near a Whole Foods.

Even with the higher sales tax, this all seems a little unfair. Thanks to its strategy of selling mainly private label products and an ever-rotating inventory to keep costs down, Trader Joe’s has a much more budget-friendly reputation than the store nicknamed “Whole Paycheck” (even though, on occasion, items at Whole Foods are cheaper). Isn’t the fact that those with less valuable homes have to shell out for more expensive groceries yet another symptom of worsening wealth inequality in this country?

Not quite. More than likely, it’s just a matter of geography. Whole Foods and Trader Joe’s have a comparable number of locations (approximately 420 and 450, respectively). Both have a strong presence in urban areas, but looking at location maps, Trader Joe’s is more heavily concentrated on the coasts, particularly in high-cost areas like California and the Northeast.

Whole Foods, on the other hand, can be found more easily in the middle of the country, in Trader Joe’s-less states like Idaho and Alabama (which will get its first TJ’s this fall). That means the Trader Joe’s sample is likely skewed more toward some of the most desirable areas of the US. Furthermore, the study didn’t include the best neighborhoods of all: those with both grocery stores close at hand. Residents of those areas don’t know how their home price appreciation lines up with their grocery store offerings, but they can pick up their cheap pantry staples at Trader Joe’s and still have time to swing by Whole Foods for nice piece of wild-caught haddock .