Even on a green day for the stock market, rare earth metals mining company MP Materials (MP 0.07%) had an uncommonly fantastic Friday.

After reporting earnings for fiscal Q3 the previous evening, MP stock soared 8.7% when markets reopened as investors cheered MP's beating analyst targets on both top and bottom lines. Where Wall Street had predicted MP would earn $0.30 per share (pro forma), the company reported a 20% beat -- $0.36 per share. And where the Street had forecast sales of only $116.8 million, MP delivered $124.4 million -- six and a half percent better than expected. 

And even then, the good numbers were just getting started.

MP Materials by the numbers

Sales and earnings at MP Materials didn't just exceed expectations -- they grew 25% and 43% year over year, respectively, with earnings growing nearly twice as fast as sales. To be precise, net income grew 48%, but earnings per share, as calculated according to generally accepted accounting principles (GAAP), grew 43%. 

Curiously, MP actually produced and sold less rare earth oxides in Q3 2022 than it did in Q3 2021. Production volumes declined 9% and volumes sold declined 17%. But the price of these rare earths surged 51% year over year as demand for rare earths remained high.

The result: Despite selling less stuff, MP Materials ended up making more money in Q3 2022 than it did a year ago.

How MP will make even more money

The bulk of MP's revenue currently comes from what the company calls Stage I operations -- mining and selling unprocessed rare earth oxides. In Q3, however, MP announced that it had officially commissioned its Stage II operations, which will process rare earths from the oxides into purer forms of, for example, neodymium-praseodymium elements, for sale farther down the supply chain.

To add even further value, these elements are then formed into actual rare earth magnets in Stage III. Not coincidentally, MP said that in Q3 it completed construction of the building shell that will house its magnetic facility when complete -- completing the value-added chain in a way that should significantly enhance the company's profitability.

Valuing MP Materials stock

So what does all of this mean in dollars and cents? As of Friday's closing bell, MP Materials stock commanded a total market capitalization of $5.6 billion. MP's cash-rich balance sheet ($600 million more cash than debt) furthermore reduces the company's enterprise value to just $5 billion. And MP Materials earned $250 million in net profit over the last 12 months, thus giving the company a cash-adjusted price-to-earnings ratio of just 20 times earnings.

This implies that MP Materials stock would be "fairly valued" if its long-term expected earnings growth rate was 20% or above. But in fact, according to analyst projections collected by S&P Global Market Intelligence, Wall Street is expecting MP to grow its earnings at 24.5% annually over the next five years.

That's an aggressive target, but given American industrial policy to separate itself from dependence upon rare earth metals supplied from China, and to support a homegrown supply chain that can contribute to manufacturing of electric vehicles, wind turbines, and similar rare-earth-consuming technologies, I suspect 24.5% is actually a reachable figure -- in which case, MP Materials stock could very well be undervalued at current prices.

Granted, there are caveats and provisos to this. Of particular note, free cash flow at MP continues to lag reported earnings. (MP generated only $94 million in positive free cash flow over the last 12 months.) That being said, as construction of the company's new facilities is completed, I'd expect capital spending to wind down and free cash flow to tick up over time, eventually matching reported earnings.

With a stock price that's basically tracked the S&P 500's performance over the past year -- down 21% -- but growth prospects significantly more attractive than the average S&P stock, MP Materials stock looks like a rarity in the stock market: a clear-cut bargain.