Consumer goods companies are in the spotlight this earnings season because of inflation and tightening consumer budgets. Investors have already started seeing the ramifications of these negative economic factors, even from large consumer staples like Walmart (WMT 0.60%), which announced lowered expectations for growth and profitability.

However, Chipotle Mexican Grill (CMG -0.07%) just defied the odds. Despite inflation running rampant and consumers cutting discretionary spending, Chipotle continued to deliver healthy top-line growth and profitability in its second quarter -- which it reported on Tuesday -- driven by a big competitive advantage. While other companies are getting burned, Chipotle is serving up great results for investors. Here's why you might want to be interested in what Chipotle is cooking up.

Person eats burrito

Image source: Getty Images.

Pricing power remains strong

With the latest inflation reading at 9.1% in June, consumer discretionary businesses are getting hit on both sides. First, these businesses are seeing rising costs to operate. That means higher costs for avocados, dairy, and chicken for the fast casual eatery chain. These businesses are seeing consumers spend less, too. After all, if prices for everything are soaring higher, consumers might make their lunch at home. 

To deal with rising input costs, Chipotle has been utilizing its main competitive advantage: Its robust brand reputation. The company has been slowly raising prices on its goods, offsetting rising costs. Despite these price increases, the company hasn't seen stagnating demand. In fact, comparable restaurant sales grew 10% year over year in Q2. 

Because of these price hikes, Chipotle has been able to improve its profit margin. In Q2, the company's store-level operating margin rose 70 basis points year over year to 25.2%, helping the company's overall operating margin jump from 13% in the year-ago period to 15.3% in Q2 2022. As a result, the company's net income soared 38% year over year to $260 million in Q2. 

The company also sees more room to expand its prices to keep profits healthy. Chipotle will raise prices in August by "mid to high single-digit" percentages. This shows that, even though Chipotle has already been using its pricing power for several quarters, its brand is so strong that it believes it can continue raising prices without falling victim to declining demand.

There's another reason why Chipotle's business was booming this quarter. Aside from Chipotle's brand and loyal customer base, the company found that its customer base skews toward higher-income people. Chipotle's CEO Brian Niccol also noted that, while demand from its low-income demographic has started to pull back, the purchase frequency from higher-income consumers actually increased in Q2.

Chipotle's digital endeavors are another bright spot

While the main highlight of Chipotle's second quarter was its strength in this inflationary environment, the company also made progress on its digital initiatives. Digital sales represented 39% of food and beverage revenue in Q2, and the company now has 29 million digital rewards members. Even the largest restaurant stocks like Starbucks (SBUX -0.86%) don't have that kind of scale: In its most recent fiscal quarter ending April 3, the drink company reported 26.7 million active reward members.

The company has also continued to ramp up the prevalence of Chipotlanes -- Chipotle's pickup drive-through lanes that are available only for digital orders. In Q2, 76% of the 42 stores it opened had Chipotlanes, and now 430 stores have them installed. 

Digital sales might not seem all that important, but they have a long-term impact on profitability and efficiency. Not only does mobile ordering help increase new restaurant sales, and make the ordering experience faster and more convenient for digital users, it also boosts the company's profit margin. After all, Chipotle does not have to pay employees to take that digital order, only to make it, which decreases expenses.

Why now is the right time to buy Chipotle stock

Shares have dropped 27% over the past year, bringing the company's valuation down to its historical average of roughly 46 times free cash flow. Over the past decade, the company has primarily traded between 40 and 55 times free cash flow (with some exceptions), so the company looks reasonably valued today.

Not to mention that Chipotle rewards patient shareholders by repurchasing over $600 million in stock.

Chipotle's pricing power has allowed it to flourish during this uncertain time, and there aren't any signs of this slowing down. This could help the company prosper over the short term, allowing continued investment in the long-term value drivers of the business. Therefore, Chipotle looks appealing over both the short and the long haul, which is appealing during this uncertain economic environment.