It's been a disappointing past few months for shareholders of Rio Tinto Group (RIO 0.68%) and Freeport-McMoRan (FCX 2.23%). Although both metal mining stocks started 2023 on a bullish note, both have since peeled back from their late-January peaks. Freeport shares are down 20%, and Rio Tinto's stock is down just a little more.

The reasons for this weakness are understandable. Worldwide economic lethargy (and an outright economic slowdown in China) are taking a toll. So is the rising value of the U.S. dollar. Since prices of commodity metals like iron and copper are primarily priced in U.S. dollars, the currency's strength pushes metal prices lower, thus crimping the profitability of mining them.

The bigger picture for industrial metals is actually quite bullish, however, making the recent dips in Freeport-McMoRan and Rio Tinto shares a magnificent buying opportunity.

Copper demand is set to swell

Copper headlines show the current rhetoric is bearish. Data from the London Metal Exchange indicates copper inventory levels have doubled just within the past two months, suggesting demand has unexpectedly dried up.

Underscoring this idea is that the difference between copper's buy-it-now spot price is below the metal's futures price to a degree not seen in almost three decades, according to the London Metal Exchange. The disparity implies a sense of supplier urgency in getting rid of inventory.

The situation isn't indicative of the new long-term norm, however. In fact, it's contrary to what's likely in the cards.

S&P Global, research outfit Wood Mackenzie, the International Energy Agency, and Goldman Sachs Group all agree that the advent of electric vehicles, solar power, and other electrification efforts meant to displace the use of fossil fuels is driving incredible demand for copper, and specifically copper wire.

Indeed, use of copper is expected to nearly double by 2035, according to S&P Global Market Intelligence, echoing expectations from the other aforementioned analytic firms.

The problem: Copper miners like Freeport-McMoRan don't yet have the capacity to meet that demand. As Standard & Poor's assessment of the matter explains it, "Assuming mining output continues to grow at a rate of 2.69% annually (as it has done for the past decade), global output will reach a mere 31 million [metric tons], a far cry from the 50 million figure that we'd need ... ."

Meanwhile, recent economic weakness has put several new and/or expansive copper mining projects on hold, including some of Freeport's. Standard & Poor's reports last year's worldwide capital expenditures on copper mine development were even with 2021's total, and these investments are projected to fall 19% this year.

Problem No. 2: It can take a couple of decades to get a new copper mine up and producing once the capital has been committed. Well-capitalized companies with mines already operating are the best positioned to meet demand in the meantime.

Freeport-McMoRan is arguably the best of such companies, even if only by virtue of being the world's second largest copper miner. It already has several developed mines, including two major operations in South America, where Standard & Poor's says the bulk of the world's minable copper lies.

Rio Tinto stock is down while iron ore prices aren't

Rio Tinto's bullish thesis is related, but different. It is predominantly an iron ore miner, and while iron prices are economically sensitive, they're not quite as sensitive as copper prices. The same for consumption of it.

For perspective, analytics outfit GlobalData reports the world only used 2.1% less iron ore in 2020 than it did in 2019 despite that year's sweeping shutdowns stemming from the pandemic. This dynamic, therefore, actually makes Rio Tinto highly sensitive to changes in iron ore prices.

This is where things get interesting. Although Rio Tinto's stock price is down from January's high, iron ore prices are bouncing back from their midyear low, nearing January's high on expectations for continued price improvements. This recovery points to budding supply-and-demand stability (finally!), which JPMorgan Chase believes will keep iron ore prices around $110 per ton all the way through 2025.

Prices have been higher, but wild price swings in the past have made it difficult for miners like Rio Tinto to commit capital to new projects or enter long-term pricing agreements with customers.   

This unpredictable volatility is also the key reason Rio Tinto missed its first-half earnings estimate, and the ultimate underlying reason shares have been out of favor for the past several months.

But again, think bigger picture and longer term. The need for iron ore is never going to go away. If anything, the shift away from fossil fuels and toward greener and cleaner energy will require infrastructure largely made of iron and steel. This consumption paired with more-predictable pricing is ideal for driving consistent operating results from Rio Tinto.

These 2 tickers might not tick every box for every investor

Neither stock is necessarily right for every investor's portfolio. While Rio Tinto's trailing dividend yield of 6.4% is impressive, the actual dividend payout changes every quarter in conjunction with changes to the company's bottom line. If you need a dividend to help pay bills, Rio Tinto isn't consistent enough to reliably do the job.

As for Freeport-McMoRan, while it has the makings of a long-term winner, it's consistently pushed around in the near term by the ebb and flow of copper prices. If you can't stomach that short-term volatility, forget it.

But if you can keep your eyes on the bigger, long-term picture, both prospects have their clear upsides. Demand for copper is set to soar -- which, as Freeport CEO Richard Adkerson told Standard & Poor's late last year, is "going to be in an environment with much higher copper prices" due to sheer scarcity.

Meanwhile, supply, demand, and prices for iron ore are likely to hold steadier in the future than they have in the past, allowing Rio Tinto to continue reliably cranking out cash even if it's not entirely consistent cash flow.

The combination of these two stocks also offers investors a chance to round out a portfolio with exposure to the basic materials sector, which is often a missing component in otherwise-diversified portfolios.