Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.

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.

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.

Timothy Green has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.