Image source: Grubhub.

What: Shares of food delivery company Grubhub (GRUB) surged on Thursday following the release of its second-quarter report. Grubhub beat analyst estimates across the board, posting strong revenue and earnings growth. At noon ET, the stock was up about 27%.

So what: Grubhub reported quarterly revenue of $120.2 million, up 37% year over year and about $6 million higher than the average analyst estimate. The number of active diners rose 24% year over year to 7.35 million, while gross food sales jumped 29% to $733 million.

Non-GAAP EPS came in at $0.23, up 31% year over year and $0.04 better than analysts expected. On a GAAP basis, Grubhub generated EPS of $0.15, up 37% year over year. CEO Matt Maloney explained the factors that drove the company's record quarter: "Product improvements, our delivery initiative and an updated brand drove better diner growth and significantly higher engagement in the second quarter. Demonstrating the powerful economics of scale in our business, we achieved an adjusted EBITDA margin of 31%, just under the levels in the first and second quarters of 2015 before we began investing meaningfully in our own delivery capabilities."

Now what: Grubhub expects to produce $116 million to $119 million of revenue during the third quarter, up from $86 million during the same period last year. For the full year, $480 million to $488 million is expected, representing growth of 34% at the midpoint.

Grubhub is both growing quickly and producing GAAP profits, a rare combination that led investors to pile into the stock on Thursday. Grubhub will need to keep up the growth going forward, a difficult task given the slew of competition it faces in the food delivery business.