Cognex (Nasdaq: CGNX) reported earnings on April 29. Here are the numbers you need to know.

The 10-second takeaway
For the quarter ended March 31 (Q1), Cognex beat slightly on revenues and missed estimates on earnings per share.

Compared to the prior-year quarter, revenue grew. GAAP earnings per share expanded.

Gross margins grew, operating margins dropped, net margins grew.

Revenue details
Cognex recorded revenue of $80.9 million. The four analysts polled by S&P Capital IQ looked for sales of $79.4 million on the same basis. GAAP reported sales were the same as the prior-year quarter's.

Source: S&P Capital IQ. Quarterly periods. Dollar amounts in millions. Non-GAAP figures may vary to maintain comparability with estimates.

EPS details
EPS came in at $0.35. The three earnings estimates compiled by S&P Capital IQ anticipated $0.36 per share. GAAP EPS of $0.35 for Q1 were 6.1% higher than the prior-year quarter's $0.33 per share.

Source: S&P Capital IQ. Quarterly periods. Non-GAAP figures may vary to maintain comparability with estimates.

Margin details
For the quarter, gross margin was 76.0%, 50 basis points better than the prior-year quarter. Operating margin was 22.2%, 60 basis points worse than the prior-year quarter. Net margin was 19.3%, 90 basis points better than the prior-year quarter. (Margins calculated in GAAP terms.)

Looking ahead
Next quarter's average estimate for revenue is $84.7 million. On the bottom line, the average EPS estimate is $0.42.

Next year's average estimate for revenue is $347.1 million. The average EPS estimate is $1.81.

Investor sentiment
The stock has a five-star rating (out of five) at Motley Fool CAPS, with 272 members out of 301 rating the stock outperform, and 29 members rating it underperform. Among 88 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 76 give Cognex a green thumbs-up, and 12 give it a red thumbs-down.

Of Wall Street recommendations tracked by S&P Capital IQ, the average opinion on Cognex is hold, with an average price target of $41.25.

Looking for alternatives to Cognex? It takes more than great companies to build a fortune for the future. Learn the basic financial habits of millionaires next door and get focused stock ideas in our free report, "3 Stocks That Will Help You Retire Rich." Click here for instant access to this free report.