Go ahead and get that $14 Sweetgreen salad. It may be cheaper than shopping at your grocery store

Women eating sadds
With sky-high grocery prices, maybe you don’t need to pack a work lunch after all.
Liz Hafalia—The San Francisco Chronicle/Getty Images

It’s not just you: Food prices are out of this world. 

I’ve just relocated from Washington, D.C., to Brooklyn, where a recent run to Key Food for five days of lunch groceries set me back more than $60 (that includes $7.55 for three bell peppers).

As I painfully swiped my card, I thought about the age-old wisdom of packing a work lunch instead of dropping $14 at Sweetgreen. At this rate of inflation, that’s genuinely not much of a difference—especially factoring in the time I spend at my kitchen counter chopping vegetables (with the AC off, to save on utilities because of, you guessed it, inflation).

Forgoing a restaurant meal to cook at home has long been heralded as an easy and reliable way to lower expenses, but record inflation—the highest since the early 1980s—is threatening that standard.

Groceries and restaurant prices increased year over year by 13.1% and 7.6%, respectively, according to the Labor Department’s July 2022 consumer price index. That 5.5% difference is the biggest inflationary gap that’s existed between groceries and restaurants since 1979, the Wall Street Journal’s Heather Haddon noted, part of the biggest food inflation we’ve seen since the 1980s. 

It’s left grocers and restaurant execs in a heated debate over whether dining out or dining in is more economical these days. Turns out, they’re both sort of right.

While dining out will—mostly—still set you back further (especially when accounting for tips, hefty markups, and gas to get to and from the restaurant), it’s the grocery store where consumers are most likely to shell out more than usual. With grocery inflation way higher than restaurant inflation, the price to eat out is now relatively discounted compared with what it used to be.

That’s largely due to the offers on hand. As Haddon pointed out, both Wendy’s and Burger King have run ads for $5 meals this year, while IHOP and Applebee’s are offering a smattering of deals such as $1 shrimp and free breakfast for kids. On the other hand, “there’s no question that menu prices are higher than they’ve ever been” at the several high-end restaurants owned by Union Square Hospitality Group, its founder Danny Meyer said last week

The cost for a bag of chips isn’t what it once was

Food prices have been skyrocketing globally ever since Russia’s February invasion of Ukraine, one of the world’s biggest grain exporters. Supply has resumed in most categories, but across the board has yet to meet pre-invasion levels. 

It’s inflated the price of raw ingredients, like flour or coffee grounds, which consumers buy in grocery stores but not at restaurants, Paul Ashworth, chief North America economist at research firm Capital Economics, told the Journal.

Consider that the cost of a 13-ounce bag of Lay’s Classic Potato Chips soared by 38% from $3.55 to $4.90 from June 2021 to June 2022, according to data that Datasembly provided to Fortune. And the average price of a 16-count package of Kraft Singles American Cheese Slices rose nearly 15%.

The affordable chain restaurants offering deals are seizing the inflated prices as an opportunity to attract new customers: wealthier ones who’d otherwise frequent higher-end spots. Earlier this spring, sales at Applebee’s and IHOP among households earning over $75,000 per year jumped by between 6% and 8%, its parent company’s CEO, John Peyton, told analysts last week.

Young, rural households are hit hardest by grocery prices

Shoppers in rural areas, low-income workers, and younger people feel the burden of costlier groceries the most, Fortune’s Megan Leonhardt reported

It’s a bigger struggle for Gen Z, per a recent Consumer Food Insights report from Purdue University’s Center for Food Demand Analysis and Sustainability. Nearly a third of Gen Z households reported seeking groceries from a food pantry, church, or other charity in the past 30 days; compared with 8% of boomer-headed households. 

That statistic dovetails with the fact that younger Americans generally make less, Jayson Lusk, head of agricultural economics at Purdue, told Leonhardt. “Food inflation is outpacing salary growth, and it hits those with the lowest incomes the hardest.”

But many young people and high earners still feel that cooking at home is more cost-effective in the long run, even if the bang for their buck doesn’t stretch as far as it once did.

They were the first to pull back on dining out amid inflation—despite the fact that the cost of food consumed away from home has crept up more slowly than other goods, according to a recent Morning Consult survey

It found that 64% of U.S. adults said they were “very concerned” about inflation’s impact on their household finances. Because restaurant meals are often considered “discretionary spending,” as the survey puts it, they were often first to go.

Any way you cut it, food prices aren’t a bargain.

Sign up for the Fortune Features email list so you don’t miss our biggest features, exclusive interviews, and investigations.