What happened

Shares of memory chip manufacturer Micron Technology (MU -3.78%) rose 23.3% in March, according to data provided by S&P Global Market Intelligence. The gains were driven by a solid second-quarter report and third-quarter guidance that blew past analyst estimates.

So what

While per-bit prices of DRAM and NAND tend to fall over time, periods of either low supply or high demand can drive up prices dramatically. That's exactly what happened during the second quarter, with Micron growing its DRAM bit sales by 1% while enjoying a 21% increase in per-bit price compared to the first quarter. NAND prices declined by 6%, but an 18% jump in sales volume led to higher revenue.

A Micron facility in Folsom, CA.

Image source: Micron.

Micron also managed to cut per-bit costs, with DRAM and NAND cost per bit falling by 6% and 15%, respectively. Micron's second-quarter revenue jumped 58% year over year, while non-GAAP EPS surged to $0.90, up from just $0.01 during the prior-year period.

Micron's third-quarter guidance was even more impressive. The company expects to produce revenue between $5.2 billion and $5.6 billion, well above the average analyst estimate of $4.7 billion. Non-GAAP EPS is expected between $1.43 and $1.47, also substantially above analyst expectations of $0.89.

Now what

Micron is enjoying a period of constrained supply, which is driving up prices at the same time that it has been able to cut costs. The company expects non-GAAP gross margin of 44% to 48% during the third quarter, well above typical levels. It wasn't too long ago that Micron was posting losses as it struggled with slumping prices and demand, so this has been quite a quick turnaround.

This party won't last forever, though. The imbalance between supply and demand will eventually be corrected. Micron's peak earnings are much higher than its average earnings, so investors should be careful not to value the company based on unrealistic expectations. It looks like the third quarter will break some records for Micron, but that's unlikely to be the norm.