Since changing its name from Nuclear Corporation of America, selling off its non-steel assets, and going all-in on steelmaking in the early 1970s, Nucor Corporation (NUE -1.08%) has been a remarkable investment. A single $3,000 investment in the company nearly anytime between 1971 and 1978 would be worth well over $1 million today, between the appreciation of Nucor's stock price and the dividends the company has paid. 

Does this mean it's time to look elsewhere? To the contrary, the long-term prospects for Nucor look great, while its stock price represents a solid value. While a $3,000 investment in Nucor today might not make you a millionaire like it would have 40 years ago, it's still an ideal stock to own in a long-term wealth-building portfolio. 

Steel worker in a foundry with sparks flying in the background.

Image source: Getty Images.

There are two things that have made Nucor a wonderful investment over the past 40 years, and they remain in play going forward. Keep reading to learn what they are. 

Nucor is a rarity in steelmaking

Steelmakers can be very hit-or-miss investments. This heavily cyclical industry can swing from massive profits to losses within a few quarters if demand for steel catches the major producers flat-footed. But Nucor has proven itself forged from a different alloy than many of its peers. This chart shows the annual net income for Nucor, Steel Dynamics, Inc. (STLD -3.16%)United States Steel Corporation (X -3.53%), and AK Steel Holding Corporation (AKS) since 2000:

NUE Net Income (Annual) Chart

NUE Net Income (Annual) data by YCharts.

As you can see, Nucor has only reported a full-year loss once since 2000, while its biggest competitors -- especially U.S. Steel and AK Steel -- have struggled to operate profitably for years. It's not just a dearth of GAAP profits that should caution investors away from many steelmakers. Let's look at cash flows:

NUE Cash from Operations (Annual) Chart

NUE Cash from Operations (Annual) data by YCharts.

What does this chart teach us? In short, that while U.S. Steel's operating cash flows are better than its GAAP net income might make it seem, both it and AK Steel have struggled to deliver positive free cash flows. Compare that to the relatively steady operating cash flows from Nucor and Steel Dynamics (which shares some important traits we will discuss later) and free cash flows almost every year (with one exception for Nucor) for more than a decade. 

Nucor's operating model, which relies heavily on electric arc "mini-mills," gives it far more operational cost flexibility than AK Steel and U.S. Steel (this is the trait it shares with Steel Dynamics). It's what makes it one of only a few companies that even make the cut as steelmakers worth considering. 

Factor in a management team that has proven to be incredibly skilled at allocating capital to expand the company's breadth of offerings through timely acquisitions, and then integrating those acquisitions to deliver strong incremental returns, and Nucor is a rarity in steelmaking as a stock to buy and hold for the long term. 

Global infrastructure still means steel

Pylons for a bridge, featuring lots of steel, under construction.

Image source: Getty Images.

There will be a need for massive infrastructure investments in the U.S. and around the world in the coming decades. The global middle class population is growing rapidly, and that growth will require a significant expansion of energy, transportation, telecommunications, water, and other critical infrastructure capacity. America is years -- and billions of dollars -- behind in spending to simply maintain its once world-leading roads, power grid, and other infrastructure assets. This dearth of spending will require a lot of catching up in future years, particularly if the country intends to remain competitive on a global basis. 

That will mean a lot of demand for steel. According to the World Steel Association fully half of the steel used globally in 2015 went into building and infrastructure projects. Another 16% went to mechanical equipment, like the cranes and heavy machines used to build and maintain -- you guessed it -- infrastructure. 

City skyline at night, showing multiple large construction cranes.

Global population growth and urbanization will require trillions of dollars of infrastructure spending in coming decades. Image source: Getty Images.

Estimates are that the global population will be 2.7 billion higher by 2050, with most of that population living in urban environments. Infrastructure spending over the next 30 years is almost certain to be higher than it's ever been in history. As one of the world's best, most profitable steelmakers, Nucor should be a major beneficiary of this. 

Nucor is worth buying now and holding for the very long term

Trading for 15.2 times trailing-12-month earnings, Nucor stock is a solid value. The company could see pressure on its results in the next few quarters as potentially illegally subsidized imports flood the U.S. market and deflate prices. But while temporary pressures like this could cause Nucor's stock to fall in the short term, that's not a given. Instead of using that as a reason to avoid the company, I think it would be better to invest now at what is clearly a good value, with the willingness to buy more later if the market gives us a buying opportunity. 

Factor in a dividend yield of 2.7%, and a 40-plus-year track record of increasing the regular dividend payout each year, and it's definitely not too late to buy, especially if you're willing to hold for many years to come.