Meta Platforms (META -0.05%) is all-in on artificial intelligence.

Following the launch of its Llama 3 large language model and Meta AI chatbot, CEO Mark Zuckerberg said, "We're in a place where we've shown that we can build leading models and be the leading AI company in the world." That's led him and the management team at Meta to increase the company's budget for capital expenditures, mostly related to AI data centers.

Alongside its first-quarter earnings release, Meta raised its full-year capital expenditure outlook to $35 billion to $40 billion, up from $30 billion to $37 billion. That came after it spent $6.72 billion in the first quarter.

That's a huge amount of spending, practically doubling Meta's annual capital expenditures from 2021. Investors balked at the idea of Meta spending so heavily to build out its AI. The market sent shares down significantly after the first-quarter earnings announcement in late April.

But Meta's spending much more on something else entirely, and investors can't afford to ignore it.

The Meta logo displayed on a smartphone.

Image source: Getty Images.

Meta spent $14.64 billion to do this last quarter

During the Q1 earnings call, Zuckerberg made it clear that management aims to run all other parts of its business outside of building and scaling its AI products as efficiently as possible. That's resulted in substantial cash generation despite its heavy spending on AI data centers. The company's first-quarter free cash flow totaled $12.53 billion.

As a result, Meta has plenty of cash to return to shareholders, and that's exactly what it's done. It spent $14.64 billion last quarter buying back stock. That's the most it has spent on share repurchases since the fourth quarter of 2021.

Meta's board authorized a $50 billion increase to its share repurchase authorization in February. As of the end of the first quarter, it still had $66.4 billion left.

While share repurchases are discretionary, there are good reasons to believe management could use a lot of that authorization up by the end of the year. Despite the planned investments in AI, Meta should produce strong free cash flow growth by boosting its top line and expanding its margins. Plus, it has about $58 billion in cash on its balance sheet. Management may also be motivated by potential changes to share repurchase taxation, which could make future buybacks more expensive.

As such, it wouldn't be too surprising if Meta continues to spend about twice as much on share repurchases this year as it does on capital expenditures. Both are very important components when it comes to the future of Meta stock.

What does it mean for investors?

When a company repurchases its shares, it increases the remaining shareholders' stakes in the business. As a result, earnings per share will rise, all else being equal. It's typically a very effective way to boost shareholder value.

But there's a big caveat. If the company overpays for its own stock, it can be a waste of the company's resources, decreasing its overall value to investors long term.

Imagine buying a house for 10% more than its assessed value. You effectively just decreased your wealth by the amount you overpaid. The same is true for share repurchases.

Last quarter, Meta's average repurchase price was $429.46 per share. As the stock climbed above $500 per share in March, it notably pared back its repurchase activity.

Meta currently trades around $468 per share, so most of those share repurchases have worked out well in the short run. Importantly, Meta stock currently trades at a fair price. Its forward price-to-earnings (P/E) ratio of 23.5 is above the S&P 500 average of 20.7. However, its strong free cash flow growth, existing cash on the balance sheet, and capital return plans should give it a slight premium to the market. Analysts expect its organic growth and share repurchases to fuel an average 30% increase in earnings per share over the next five years, giving it a PEG ratio below 1.

As such, investors should feel comfortable with Meta buying back the stock at its current level or even a bit higher, and they may want to add more shares themselves.