Construction company Sterling Infrastructure (STRL 3.61%) is controlling costs and delivering a lot better profitability numbers than Wall Street had predicted. Investors are buying in, sending shares of Sterling up 21% as of 12:30 ET on Tuesday.

Profitability is up by selectively choosing projects

Sterling is focused on large construction projects like transportation rehab and construction, new buildings, and site prep for data centers. The company posted fourth-quarter earnings of $1.30 per share, beating the $1 estimate, despite sales that at $486 million missed expectations by $36 million.

Earnings were up 94% on a per-share basis year over year thanks to a 350-basis-point improvement in gross margins. Sterling ended the year with a backlog of more than $2 billion in future business, a 46% increase from the end of 2022.

CEO Joe Cutillo said the margin improvement was the result of "the benefits of project selectivity and mix," and said he believes the momentum can continue into 2024.

"We believe 2024 will be another year of bottom-line growth well in excess of our top-line growth," Cutillo said. "Our strong backlog position, visibility into future opportunities, and laser focus on maximizing returns give us confidence in our ability to deliver on our guidance for the year."

Is Sterling a buy heading into 2024?

The company said it expects revenue of between $2.125 billion and $2.215 billion in 2024, and net income of between $155 million and $165 million. The sales figure is in line with Wall Street expectations, but the net income projection is well ahead of the $149 million estimate.

Sterling sees continued strong demand for new data centers, transportation projects, and residential construction, with weakness expected in small warehouses and commercial real estate.

Shares of Sterling are now up 186% in the past year, and 642% over the past five years. Wall Street is clearly anticipating more growth, and right now the company is doing a good job on focusing its growth on projects that can generate positive results.

That's a formula that can continue to power Sterling Infrastructure higher in 2024.