It has been a difficult year for the stock market as the S&P 500 is down 21% in 2022. Rising interest rates have forced investors to seek safer assets with fears of a recession mounting. But amid the market turmoil, there are quality businesses on sale. One such company is Chipotle Mexican Grill (CMG 0.19%). 

With its shares down 18% in 2022 (as of this writing), Chipotle is a compelling buying opportunity for long-term investors. Let's take a closer look. 

Solid Q3 financial results 

The popular Tex-Mex chain reported third-quarter financials on Oct. 25 with revenue up 13.7% year over year and diluted earnings per share up 28.1%. Same-store sales, or comps, jumped 7.6%, a strong showing considering the uncertain economic environment. Additionally, Chipotle was able to open 43 new restaurant locations in the quarter.

Surging inflation has been a key theme at the top of investors' minds for the past year -- both consumers and companies alike have had to deal with rising costs. In Chipotle's case, management highlighted having to pay more for inputs like dairy, packaging, tortillas, and avocados in the latest quarter, which had a negative impact on profitability. But dealing with higher input costs is a problem that's not specific to Chipotle. 

The business combated this situation by raising prices during the quarter, its third time doing so in the past 15 months. And in October, prices went up again in 700 locations. Nonetheless, the average price of a chicken burrito bowl, which makes up 50% of orders in the U.S., remained below $9. The result was that Chipotle's operating margin jumped from 12.3% in the year-ago period to 15.1% in the latest quarter, an impressive gain.

CEO Brian Niccol did point out that lower-income consumers are visiting less often, causing transaction counts to fall 1% on a year-over-year basis. However, most of Chipotle's customer base skews toward higher-income households.

The third-quarter numbers demonstrate Chipotle's strong momentum as hungry customers returned to restaurants for in-person dining, in addition to relying on the company's robust digital infrastructure. In-restaurant sales increased 22.1% year over year, while digital revenue represented 37.2% of overall sales in the quarter. Customers can order from Chipotle's mobile app, website, or from third-party delivery services to get their favorite menu items conveniently. As of Sept. 30, the company counted an incredible 30 million rewards members. 

In the fourth quarter, management expects comps to rise by mid- to high-single digits. What's more, 235 to 250 new store openings are expected for the full year, with 255 to 285 coming in 2023.

Sizable growth opportunity 

In the five-year period between 2017 and 2021, Chipotle's annual sales growth averaged 14%. This was driven primarily by new store expansion as well as greater productivity at each store. From Q3 2017 through Q3 2022, Chipotle added 716 new locations to its footprint. 

And this outstanding growth isn't ending anytime soon as the leadership team has some huge ambitions. On the third-quarter earnings call, Niccol reiterated his company's long-term goal of having 7,000 locations running in North America, more than double the 3,090 stores Chipotle operates today. Furthermore, annual unit sales are expected to eclipse $3 million in the future. More stores and more volume per store will certainly boost the company's prospects. 

Chipotle has proven itself as a strong business that continues to find ways to succeed in the challenging restaurant sector, but investors would be wise to remain patient before buying the stock. Shares trade at a price-to-earnings multiple of 50, a hefty price tag even when considering the company's long-term growth outlook. It's best to keep Chipotle on your watch list for now.