On Wednesday, struggling fast-casual pioneer Chipotle Mexican Grill (CMG 0.21%) reported surprisingly good first-quarter results. While customer traffic trends have been weak ever since Chipotle's late-2015 E. coli outbreak, the company's profit margin came in well ahead of the company's plan last quarter.

This is a good sign that Chipotle is moving in the right direction -- albeit slowly. Furthermore, the company achieved strong first-quarter earnings growth without the benefit of any meaningful changes under new CEO Brian Niccol, who took the helm in early March. As Niccol puts his turnaround plan into action, Chipotle's sales and earnings growth should accelerate.

A huge earnings beat

Chipotle achieved a 7.4% revenue increase in the first quarter on 2.2% comparable-restaurant sales growth. (The comp-sales gain would have been 2.7%, excluding the impact of deferred revenue related to Chipotle's limited-time Chiptopia loyalty program.) This comfortably beat the company's forecast for a 1%-2% comp-sales increase, excluding Chiptopia.

Still, Chipotle relied on higher prices and the addition of queso to its menu to drive its comp-sales growth. Customer traffic continued to decline, falling by more than 3%.

The interior of a Chipotle restaurant

Customer traffic still is falling at Chipotle. Image source: Chipotle Mexican Grill.

Meanwhile, Chipotle's restaurant-level operating margin rose to 19.5% from 17.7% a year earlier, mainly due to lower food and marketing costs as a percentage of revenue. By contrast, management had projected that the restaurant-level operating margin would only be 16% to 16.5% last quarter.

The result was a massive earnings beat. Earnings per share (EPS) came in at $2.13, up 33% year over year and far above the average analyst estimate of $1.57. Furthermore, Chipotle achieved this strong EPS performance even though its effective tax rate for the quarter was 36.9% -- well ahead of the normalized 28.8% effective tax rate that Chipotle expects to pay going forward.

There are lots of additional opportunities

Some pundits opined that Chipotle's strong Q1 performance was a sign that new CEO Brian Niccol hit the ground running. However, given that he started just a few weeks before the quarter ended -- and newly appointed chief marketing officer Chris Brandt joined the company on April 2 -- it seems unlikely that management changes had much impact on Chipotle's first-quarter results.

That's good news for investors, as it means that the payoff from any changes made by the new management team would represent pure upside relative to Chipotle's recent trajectory. Indeed, Niccol sees a number of ways to improve near-term performance.

Most significantly, he highlighted opportunities to make Chipotle's marketing more effective. Niccol believes that Chipotle should be able to make its brand much more visible, even with its current marketing budget. That could, in turn, boost customer traffic trends.

Niccol also noted that Chipotle needs to do a better job of drawing attention to its new mobile order and delivery capabilities. Lastly, Chipotle is likely to close some of its cash-flow-negative restaurants this year, which will naturally improve profitability going forward.

There's even more room for Chipotle to improve its sales and earnings trajectory beyond 2018. Niccol noted that he's a big believer in innovation. Menu changes, expanded operating hours, and even drive-thru windows could come to Chipotle in the future. However, changes like these will need to be developed and tested before they can be rolled out broadly.

The sky's the limit

Chipotle stock surged 24% on Thursday, the day after the earnings report, closing at $422.50, more than 70% above the multiyear low it reached in February. That means the stock is trading for a lofty 68 times Chipotle's 2017 EPS of $6.17.

However, while that earnings multiple may seem excessive based on the high single-digit growth rate of Chipotle's restaurant base, it's quite reasonable based on the company's margin-expansion potential. Chipotle's 2017 operating margin was just 6%, down from 17.6% in 2014.

If management's efforts to reinvigorate store traffic succeed, Chipotle should be able to more than double its operating margin over the next several years, even if the previous high-water mark is out of reach. Based on a low- to mid-teens operating margin and a relatively steady pace of store openings, EPS could reach $30 to $40 or even more within five years. That leaves plenty of potential upside for Chipotle stock.