Construction company MasTec (MTZ 0.83%) did much better than expected in the first quarter and the company is growing increasingly confident about 2024. Investors are buying in, sending MasTec shares up 13% as of 11:15 a.m. ET.

A turnaround is at hand

MasTec is coming off a tough year in 2023. The construction and engineering company endured delays and cancellations to large projects as customers tried to assess the health of the economy, causing MasTec to miss earnings last November.

The company responded by broadening the services it offers and focusing on priority projects, and those changes appear to be paying off. MasTec lost $0.13 per share in the first quarter on revenue of $2.7 billion, significantly better than the $0.48-per-share loss on sales of $2.6 billion that Wall Street had expected.

"Our first quarter results significantly exceeded our expectations, and I expect 2024 to begin the validation of our investment and diversification strategy over the last few years," CEO Jose Mas said in a statement. "I believe that the investments we have made in broadening our service line offerings have placed us at the forefront of the country's future infrastructure needs."

Is MasTec stock a buy?

MasTec ended the quarter with an 18-month backlog of $12.8 billion in future revenue, up $430 million from year-end. The company expects megatrends including the need for more power, clean energy, and the buildout of data centers and communications infrastructure to fuel future growth.

The company expects to turn profitable in the second quarter, and to earn $2.95 per share on revenue of $12.55 billion, offering upside to the consensus estimate of $2.69 per share on revenue of $12.53 billion heading into earnings.

Even with Friday's jump, MasTec shares still trade about 15% below where they were last summer. Investors buying in today can gain exposure to some of the most important long-term trends in tech at what is still a reasonable price.