Memory chipmaker Micron Technology (MU 0.33%) is enjoying a period of almost unbelievable profitability. Sky-high memory prices and strong demand have boosted Micron's revenue and profits to new heights. Over the past 12 months, the company has generated $28.1 billion of revenue and a whopping $12.2 billion of net income.

Despite Micron reporting record results quarter after quarter, the market has started to turn against the stock. Shares of Micron have shed nearly 30% of their value over the past three months. The price-to-earnings ratio, based on the trailing-12-month number, is now barely above 4.

Why is Micron stock being left for dead? Because stratospheric memory prices won't last forever. While Micron's results will likely remain strong for a while, certainly through its fourth-quarter report on Sept. 20, signs that the market for memory chips is turning are starting to emerge. That's bad news for Micron's bottom line.

A Micron facility.

Image source: Micron.

Tumbling NAND prices and DRAM concerns

NAND chips, which go into solid-state drives and flash memory, accounted for around 25% of Micron's revenue in its fiscal third quarter. Prices for these chips have been falling fast. Since peaking in 2017, average prices for NAND chips have almost been cut in half, according to Reuters.

In general, per-bit memory prices decline over time. But prices can rise during periods when demand outstrips supply. When that supply-demand dynamic reverses, prices can then plunge. Memory chipmakers aim to reduce their per-bit manufacturing costs at least as quickly as prices fall. But sometimes prices fall too fast, knocking down margins in the process.

Micron is already feeling this NAND price decline. Sales in its storage segment slumped 13% year over year in the third quarter, and segment operating margin dropped by one-third to 14%. If NAND prices keep falling, margins could contract further.

The remaining portion of Micron's revenue is mostly derived from DRAM chips, which are used for random-access memory in computers, servers, mobile devices, and graphics cards. DRAM prices have held up so far -- Micron's computer and networking segment and its mobile segment both reported increases in revenue and margins in the third quarter. But some analysts expect trouble next year.

Last week, analysts at Baird removed Micron from its list of top ideas. Baird sees weaker-than-expected demand for DRAM putting pressure on prices and potentially creating an oversupply situation. RBC Capital also dropped its price target on Micron stock, citing NAND price declines and a high likelihood of falling DRAM prices next year.

How bad could it get for Micron? Really bad. The last time prices for memory chips plunged, Micron's bottom line was decimated. The company posted a net loss of $276 million in fiscal 2016. Going back further, Micron lost over $1 billion in fiscal 2012. Micron has lost money in four of the past 10 years.

The next downturn could be much less severe, with profits holding up better than in the past. But given how strong this cycle was on the way up, there's no reason to believe it can't be equally as strong on the way down. While the timing and severity of the next downturn are impossible to predict, Micron investors should brace themselves for a slumping bottom line.