(Bloomberg) -- Micron Technology Inc., the largest US maker of memory chips, gained after issuing a better-than-expected outlook for the quarter, sparking hope that the worst of a brutal industry slump may be over. 

Sales will be as much as $3.9 billion in the fiscal third quarter, the company said in a statement Tuesday. That compares with an average of analysts’ estimates of $3.75 billion. The company also announced more job cuts. Shares were up as much as 3.2% at $61.18 in premarket trading. 

“Customer inventories are getting better, and we expect gradual improvements to the industry’s supply-demand balance,” Chief Executive Officer Sanjay Mehrotra said in the statement. The company delivered earnings for the second quarter that were in line with its projections “in a challenging market environment,” he said.

The forecast suggests the memory chip market may be poised for a comeback after a rough stretch. Over the past year, a steep drop in consumer demand spurred Micron’s customers to slash orders. Instead of buying new chips, they’ve been working through a pileup of excess inventory — a type of scenario that has long plagued the memory industry following boom years.

Just hours before Micron released its guidance, German chipmaker Infineon Technologies AG raised its own forecasts for the quarter and the full year, citing stronger-than-expected sales of automotive and industrial products. Demand, particularly from the auto industry, has buoyed earnings for some chipmakers as manufacturers recover from Covid 19-era shortages and global uncertainties brought about by the war in Ukraine.

Micron’s stock had gained 19% this year, closing at $59.28 in regular New York trading on Tuesday. 

The company is projecting a loss of about $1.58 a share in the current period, which includes a 45-cent impact associated with $500 million in inventory writedowns. Analysts had estimated a loss of 84 cents a share.

Makers of phones and computers are dealing with weak consumer spending triggered by rising inflation. Micron’s chips, which store and help handle information in such devices, are particularly vulnerable to swings in demand because products from rival companies are directly interchangeable and are traded like commodities.

Rapid fluctuations in the balance between supply and demand can leave producers selling the components for less than they cost to make. Even though Micron shipped more computer memory chips last quarter, revenue still shrank because prices fell about 20%.

Three months ago, Micron announced cost-cutting measures, including a 10% workforce reduction and a slowdown in investment in new production. While the revenue picture will improve in the second half of the year, profitability will remain difficult, it had said.

The Boise, Idaho-based company said Tuesday that its total headcount reduction will now equal 15%. Micron is reducing its spending on new plants and equipment by 40% to $7 billion this year, according to presentation slides posted on its website.

For 2023, the company expects that demand will grow faster than supply. Micron projects a transition to sequential revenue growth, saying that inventory has peaked and end markets such as smartphones and personal computers are contracting less severely than feared. Micron’s data center unit bottomed in the second fiscal quarter, it said.

Mehrotra has argued that the company would deliver more stable earnings than in past downturns. The industry now has a small number of competitors — and they’re more focused on profits than gaining market share — potentially making the field more resilient. Memory chips also have a wider range of uses than in the past. 

But that thesis came undone due to a unique set of circumstances: the war in Ukraine, a surge in inflation, Covid disruptions and other supply-chain woes.

Micron competes with South Korea’s Samsung Electronics Co. and SK Hynix Inc. SK — which, like Micron, is focused mostly on memory — has also suffered losses, causing it to curb expansion plans. Samsung, meanwhile, has a more diversified business. It’s the world’s largest smartphone maker and has other sizable divisions, allowing it to remain profitable and have the cash to invest. 

The pace at which profitability recovers will be determined by whether the company’s peers follow its lead and reduce production to the point that supply will be below last year’s level, Mehrotra said in an interview. Other companies have taken actions to varying degrees, he said.

“The recovery could be accelerated if further supply cuts are made,” he said. 

In the three months ended March 2, Micron’s revenue declined 53% to $3.69 billion. The company had a loss of $1.91 a share, excluding certain items. That compares with an average estimate of a loss of 63 cents a share and sales of $3.75 billion.

Showing the impact of a collapse in orders, the company is on course to lose more than $3 billion in 2023, its worst annual deficit since it first went public in 1984.

©2023 Bloomberg L.P.