Trex (NYSE: TREX) reported earnings on May 7. Here are the numbers you need to know.

The 10-second takeaway
For the quarter ended March 31 (Q1), Trex beat expectations on revenue and crushed expectations on earnings per share.

Compared to the prior-year quarter, both revenue and GAAP earnings per share expanded significantly.

Margins increased across the board.

Revenue details
Trex logged revenue of $96.1 million. The six analysts polled by S&P Capital IQ hoped for revenue of $90.5 million on the same basis. GAAP-reported sales were 39% higher than the prior-year quarter's $69 million.

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.74. The six earnings estimates compiled by S&P Capital IQ averaged $0.50 per share. GAAP EPS of $0.74 for Q1 were 147% higher than the prior-year quarter's $0.30 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 36.9%, 350 basis points better than the prior-year quarter. Operating margin was 17.5%, 830 basis points better than the prior-year quarter. Net margin was 12.8%, 550 basis points better than the prior-year quarter.

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

Next year's average estimate for revenue is $318.7 million. The average EPS estimate is $1.56.

Investor sentiment
The stock has a two-star rating (out of five) at Motley Fool CAPS, with 81 members rating the stock outperform and 51 members rating it underperform. Among 41 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 21 give Trex a green thumbs-up, and 20 give it a red thumbs-down.

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

Over the decades, small-cap stocks like Trex have provided market-beating returns, provided they're value-priced and have solid businesses. Read about a pair of companies with a lock on their markets in "Too Small to Fail: 2 Small Caps the Government Won't Let Go Broke." Click here for instant access to this free report.