Share prices of Meta Platforms (META -2.38%) bolted higher after the owner of Facebook and Instagram reported strong second-quarter results and issued upbeat guidance. The stock has been a great performer this year, up about 40%.

Artificial intelligence (AI) continues to be a major focus for the social media company, with Meta ready to invest significant money into its newest large language model (LLM) Llama 4.

Let's dive into Meta's Q2 earnings report and guidance as well as its AI ambitions and whether the stock remains a buy after the run-up in the stock this year.

Strong revenue growth and guidance

Meta grew its Q2 revenue by 22% year over year to $39.1 billion. Ad revenue climbed 22% to $38.3 billion, while Reality Labs, which is developing Meta's metaverse and the Quest Headsets used to access it, grew revenue by 28% year over year to $353 million. Operating income from Apps came in at $19.3 billion, while Reality Labs produced a loss of $4.5 billion. Earnings per share (EPS) soared from $2.98 a year ago to $5.16.

Family daily active people (DAP), which measures registered users that log into one of its apps on a daily basis, rose nearly 7% year over year to 3.27 billion in June. Family average revenue per person (ARPP), meanwhile, climbed 14% to $11.89.

Threads, its newest app, which is akin to X (formerly Twitter), was a standout, reaching 200 million monthly users. WhatsApp, a messaging app that has long been popular overseas, has reached over 100 million active users in the U.S. The company also said it was seeing good traction in adding young adult users to Facebook.

Ad impressions jumped 10% year over year, while the average price per ad also increased 10%. Growth in average price per ad was particularly strong in Europe where it grew 18%.

Looking ahead, the company expects third-quarter revenue to be between $38.5 billion and $41 billion. The midpoint of $39.75 billion was well ahead of analyst expectations for Q3 revenue at $39.1 billion.

It also increased the low end of its full-year capital expenditure (capex) forecast to a range of $37 billion to $40 billion, up from a prior range of $35 billion to $40 billion. Next year, it is looking to significantly increase that number as it invests in AI research and product development.

It said the computing power needed to train its next-generation LLM Llama 4 will likely be 10 times more than was needed to train Llama 3, while future models will continue to need more and more computing power. Meta said at this point it would rather build more capacity than it needs than be too late doing so.

Woman on social media on phone and laptop.

Image source: Getty Images.

Is it too late to buy Meta stock?

Meta's core social media advertising business is performing well, with users, ad impressions, and ad rates all up nicely. Video and in-feed recommendations are leading to more engagement and helping drive revenue. The company's sites are still among the top places for advertisers to spend their ad dollars.

Meanwhile, Meta is investing heavily in AI and will look to profit from it in the future. The company has a history of building out products and gaining large user bases before monetizing them, and this appears to be the strategy here. However, with losses piling up with Reality Labs and now the expected big spending on AI, this could become a point of contention with investors down the line.

However, Meta has a pile of cash on its balance sheet and generates robust cash flow, so it certainly has the resources to make these investments. At this point, the investment in AI looks like a good bet to make, while the metaverse is still a bit more questionable.

From a valuation standpoint, the company is now trading at a forward price-to-earnings (P/E) ratio of just 21 based on 2025 analyst estimates.

META PE Ratio (Forward 1y) Chart

META PE Ratio (Forward 1y) data by YCharts

That is certainly a reasonable valuation for a company that owns some of the most attractive sites for advertisers around the globe. Meanwhile, it could prove to be downright cheap if its bets on AI and the metaverse eventually pay off.

Taking that all together, I think investors with a long-term outlook can still buy the stock at current levels.