It's harder than ever to mine bitcoin. And less profitable, too. But mining-company stocks are still flying, even with cryptocurrency prices in retreat.
That's because these firms have something in common with the hottest investment theme on the planet: the massive, electricity-hungry data centers expected to power the artificial-intelligence boom. Some companies are figuring out how to remake themselves as vital suppliers to Alphabet, Amazon, Meta, Microsoft and other "hyperscalers" bent on AI dominance.
Bitcoin-mining -- using vast computer power to solve equations to unlock the digital currency -- has been a lucrative and cutting-edge pursuit in its own right. Lately, however, increased competition and other challenges have eroded profit margins.
But just as the bitcoin-mining business began to cool, the AI build-out turned white hot. The AI arms race has created an insatiable demand for some assets the miners already have: data centers, cooling systems, land and hard-to-obtain contracts for electrical power -- all of which can be repurposed to train and power AI models.
It's not a seamless process. Miners often have to build new, specialized facilities, because running AI requires more-advanced cooling and network systems, as well as replacing bitcoin-mining computers with AI-focused graphics processing units. But signing deals with miners allows AI giants to expand faster and cheaper than starting new facilities from scratch.
These companies still mine some bitcoin, but the transition gives miners a new source of deep-pocketed customers willing to commit to longer-term leases for their data centers.
"The opportunity for miners to convert to AI is one of the greatest opportunities I could possibly imagine," said Adam Sullivan, chief executive of Core Scientific, which has pivoted to AI data centers.
The shift has boosted miners' stocks. The CoinShares Bitcoin Mining ETF has surged about 90% this year, a rally that has accelerated even as bitcoin erased its gains for 2025. The ETF holds shares of miners including Cipher Mining Inc. and IREN Ltd, both of which have surged following long-term deals with companies such as Amazon and Microsoft.
Shares of Core Scientific quadrupled in 2024 after the company signed its first AI contract that February. The stock has gained 10% this year. The company now expects to exit bitcoin mining entirely by 2028.
For others, AI plans are more of a hedge against the inherent challenges of mining than a complete shift. That goes beyond price volatility: the computer code behind bitcoin caps the digital currency's supply at a hard limit of 21 million. And every four years, miners confront another halving, an adjustment to the bitcoin blockchain that cuts in half the number of bitcoins that can be unlocked.
CleanSpark recently raised $1.15 billion to help develop data-center infrastructure, but the company remains committed to its bitcoin mining operations.
One advantage of running bitcoin mining operations alongside AI infrastructure is the value it offers to utilities. Power companies are searching for partners that can act like a sponge for electricity. And bitcoin miners like CleanSpark can quickly turn off their power use when the grid is overloaded or unstable, which helps keep the lights on for everyone else.
However, traditional AI data centers, which need to be always on, can't offer this flexibility, according to Matthew Schultz, chief executive of CleanSpark.
"If and when there's a weather-related event or anything else, we can curtail a portion of the portfolio to help stabilize the grid," he said. "And what we found is the demand for that type of load is much greater."
CleanSpark has advanced 25% this year.
Still, not all miners are a good match for the AI build-out, analysts say. Switching from mining bitcoin to supporting high-performance computing, or HPC, isn't cheap, and major investments are required to upgrade existing mining facilities.
"Bitcoin miners have an advantage in understanding power and its use but there's a night and day difference between mining and HPC support," said Kevin Dede, senior research analyst at H.C. Wainwright. "It's more than an order of magnitude of intensity and complexity."
Despite investor excitement, the AI industry isn't without its own serious risks. Recent fears of an AI bubble have caused jitters in the market, with some analysts citing overstretched valuations of AI stocks and massive capital spending in AI infrastructure.
One potential consequence of miners shift: diminished U.S. production and a growing share of bitcoin production moving overseas. Such a flight of mining power would stand in contrast to President Trump's previously stated goal of ensuring all bitcoin is "mined, minted and made in the USA."
"I think the writing on the wall is quite clear, and shareholders would value an AI data center infinitely higher than a bitcoin mining data center," said Brett Knoblauch, head of digital asset research at Cantor Fitzgerald. "It's almost like the market's forcing their hand to go away from bitcoin mining into AI."

