Meta Platforms (META 0.35%) has made for a terrific investment since its initial public offering in 2012 as Facebook. From when shares first started trading to May 7 this year, they have soared 1,140%, easily beating the Nasdaq Composite index.

In more recent times, the social media stock has been on an absolute tear. It's up a whopping 420% just in the past 18 months, as favorable stock market and industry conditions create a winning scenario for investors.

So, is it too late to buy Meta Platforms stock?

Proving itself again

In 2022, Meta was struggling. The rapid rise of interest rates spooked executives who feared a recession was imminent. Consequently, the ad market took a hit. It also didn't help that Meta founder and CEO Mark Zuckerberg was intensely focused on investing aggressively in his metaverse ambitions.

The stock finished the year down 64% as investors became pessimistic about the direction of the business. Sales dipped 1.1% in 2022, with the operating margin shrinking significantly. There wasn't a lot to be excited about.

But Meta has proven to shareholders that it's an outstanding business. After implementing ongoing cost cuts and other streamlining measures, the company has won over investors.

The fundamentals look strong. Meta reported a 15.7% sales jump in 2023 before posting 27.3% growth in the first three months of 2024. That's the fastest percentage gain since the third quarter of 2021.

This is thanks to a digital ad market that's on much better footing today. As the economy remains resilient, marketing executives are more willing to spend on advertising. And this clearly benefits Meta, which has unrivaled reach, as exemplified by its 3.24 billion daily active users.

Focus on AI

The impressive performance reveals another attractive characteristic of this company. And that's just how well Meta is positioned for the artificial intelligence (AI) revolution.

Meta has already released chat assistants that serve the users of its apps. Advertisers are also being catered to with generative AI features that can make their jobs easier to target specific audiences.

"We should invest significantly more over the coming years to build even more advanced models and the largest scale AI services in the world," Zuckerberg said, on the first-quarter 2024 earnings call.

Luckily, this business currently has $58.1 billion of cash, cash equivalents, and marketable securities on the balance sheet. And it produced $12.5 billion of free cash flow in 2023. This gives Meta virtually unlimited financial resources to not only continue paying up to hire top talent, but to also invest heavily to build servers and data centers.

Valuation and growth

Investors looking to buy a specific stock should consider the factors that can drive their returns going forward. Two variables to focus on are valuation and growth.

As of this writing, Meta shares trade at a forward P/E ratio of 23.6. For such a dominant enterprise -- one that's still growing its user base, possesses competitive advantages, is extremely profitable, and that's making a strong push into AI -- that looks like a compelling valuation. Of course, it's not as cheap as it was in late 2022, but the situation was a lot more uncertain then.

On the growth front, Meta still has lots of potential. According to Wall Street consensus analyst estimates, the business is forecast to register annualized revenue and earnings-per-share gains of 14.1% and 20.5%, respectively, over the next three years. While these projections can be wrong, they give prospective investors an idea of the company's very positive outlook.

No, I don't think it's too late to buy Meta stock. The business is poised to continue doing well for its shareholders over the next few years.