With inflation at multi-decade highs, many companies are grappling with rising input costs affecting their bottom line. This is especially true for companies with high food and energy costs and large employee counts.

Fast-casual Mexican restaurant chain Chipotle (CMG 0.40%) fits this description perfectly. With almost 100,000 employees seeing their wages rise and high food costs (avocados are not cheap!), the company's store-level margins are moving in the wrong direction, making investors nervous about its prospects in the coming quarters. 

Chipotle is clearly struggling with inflation right now, and the shares are down 27% year to date. So is the stock still a buy for long-term investors?

The first quarter looked solid

In the first quarter of 2022, Chipotle's revenue grew 16% year over year to $2 billion. This was driven by 9% comparable-store sales growth and new restaurant openings. The operating margin was 9.4% in the period, up from 9.3% a year ago.

Chipotle is seeing inflationary pressures at the store level right now, with food and labor costs at 31% of revenue, up 100 basis points year over year. But so far, the company has been able to flex its pricing power to mitigate a lot of these cost pressures.

The only concern is Chipotle's store-level operating margin. In the first quarter, this metric was 20.7%, down from 22.7% a year ago. So far, the company has been able to maintain its consolidated operating margin through operating leverage at the corporate level.

But if Chipotle is going to reach the operating margins it had before its E-coli outbreak (which were north of 15%), store-level operating margins will likely need to move higher in the coming years. Inflation could prevent that from happening.

CMG Operating Margin (TTM) Chart

CMG operating margin (TTM). Data by YCharts. TTM = trailing 12 months.

Long-term opportunities are still there

We'll get back to profit margins in the next section. But first, let's talk about Chipotle's opportunity to grow its store count in its native North American markets (the United States and Canada). Currently, the Mexican food chain has just over 3,000 restaurants, a total that has steadily increased each year since its initial public offering (IPO) in 2006.

Over the long term, management thinks Chipotle can hit 7,000 locations just in North America alone, or around 2.3 times the current store count. If comps growth continues while store count grows by that multiple, then Chipotle's trailing 12-month revenue of $7.8 billion could grow by a multiple of 3 or maybe even higher this decade. That is a lot of momentum for a fast-casual restaurant chain, and this is before considering the company's early steps to  enter the European market.

Margins will determine Chipotle's fate

If Chipotle can grow its store count to 7,000 and triple its revenue by 2030, it will bring in $23.4 billion in annual revenue by then. This might make you think the stock is a buy, but we need to move down the income statement and evaluate what its profit margins could be by then.

Assuming Chipotle is able to regain its old form and expand its margins to 15% by 2030, the company will be earning $3.5 billion in annual operating income. At the current market cap of $35 billion, that would give the stock a forward price-to-operating income (P/OI) ratio of 10.

But if inflationary pressures keep margins closer to 11% (where they are now), operating income will only be $2.57 billion in 2030, at a forward P/OI of 13.6. This might not seem like a huge change, but it can be the difference between Chipotle beating or trailing the market's returns over that time span.

Predicting what inflation will be in 2030 and how it will affect Chipotle's profitability is likely a fool's errand. But it can be helpful for investors to go through these different scenarios to see what different margin levels will do to Chipotle's potential as a stock.

If you own shares, you need to be confident the company can continue expanding margins through both efficiency gains and pricing power in the decade ahead.