Although Chipotle Mexican Grill (NYSE:CMG) missed earnings estimates in the release of its Q4 and fiscal 2012 financial results, the company did surprise Wall Street with better-than-expected revenue gains.

Revenue growth was driven primarily by new restaurants and single-digit comparable restaurant sales. Rising food costs -- driven mostly by increases in beef and, to a lesser extent, salsa and dairy -- ate into the company's revenues.

For Q4, revenue totaled $699.2 million, beating an expected $698.9 million. Year-over-year revenue was up 17.2%, and comparable restaurant sales increased 3.8%. Meanwhile, food costs spiked by 130 basis points to account for 33.5% of revenue. Diluted earnings per share for the quarter amounted to $1.95, while analysts estimated $1.96. 

For the fiscal year, Chipotle met expectations with $2.73 billion in revenue, a 20.3% increase. Though comparable restaurant sales increased by 7.1%, rising costs offset those gains. Up 10 basis points, food costs remained relatively stable and accounted for 32.6% of revenue. Total diluted EPS for the year were $8.75, a 29.4% increase, while analysts estimated $8.76.

"Our empowered restaurant teams once again were able to attract more people into our restaurants, creating positive comparable sales at Chipotle despite a sluggish economy and the roll off of our price increase," co-CEO Monty Moran said. "We feel confident in our continued ability to drive sales growth in 2013 through a combination of new restaurant growth and our top-performing, empowered restaurant teams creating an extraordinary dining experience for our customers."

In the next year, management expects to open 165 to 180 new restaurants and sees comparable restaurant sales staying flat or rising by low single digits.

Fool contributor Kevin Chen has no position in any stocks mentioned. You can follow him on Twitter at @TMFKang or on Google+The Motley Fool recommends and owns shares of Chipotle Mexican Grill. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.