Many tech stocks surged over the past year thanks to factors such as the artificial intelligence (AI) boom. One stock that more than doubled in that time is Meta Platforms (META 0.43%).

The Facebook parent was at a 52-week low of $197.90 last March, but made an incredible reversal, and this March, it reached a high of $523.57. Shares have retreated from that, so is now the time to buy? Or is it too late to reap further upside?

To assess the situation, it's best to evaluate Meta from the perspective of a long-term investment. With this in mind, let's look at the social media company to determine if it makes sense to invest in its stock at this time.

How Meta shares achieved outsize results

Part of evaluating Meta as a potential investment requires understanding how its shares performed such a remarkable about-face over the last year. The factors leading to this outcome began in 2022.

At the start of that year, the company's share price exceeded $300. But as the year wore on, shares were battered because advertisers reduced spending with the company in 2022 and into 2023 in response to conditions at the time, such as rising inflation.

This was a blow to Meta since digital advertising accounts for nearly all of its revenue. As a result, 2022 sales dropped to $116.6 billion from $117.9 billion in 2021.

That set the stage for the comeback. The advertising market recovered in 2023, allowing Meta to achieve full-year revenue of $134.9 billion, a 16% year-over-year gain.

The company also aggressively cut costs last year with CEO Mark Zuckerberg calling 2023 Meta's "year of efficiency." As part of this, the company reduced its employee count by 22% compared to 2022.

This helped to bring 2023 costs and expenses to $88.2 billion. Although this figure was a modest increase from $87.7 billion in 2022, it was a vast improvement over the 23% jump between 2021's $71.2 billion in expenses and 2022.

These cost cuts helped Meta generate strong free cash flow (FCF) of $43 billion last year, a substantial increase from $18.4 billion in 2022. FCF provides insight into the cash available to invest in the business, pay debt obligations, repurchase shares, and fund dividends.

Consequently, Meta declared its first dividend in company history on Feb. 1. This news, its cost cuts, and strong revenue rebound all contributed to the share price shooting skyward.

Meta's future revenue growth

Year-over-year revenue gains are likely to continue, at least in 2024. The advertising industry forecasts digital ad spending to increase this year by more than 13% over 2023, serving as a tailwind for Meta's revenue growth.

The company expects first-quarter revenue of at least $34.5 billion, which would be a double-digit increase over 2023's $28.6 billion. Beyond advertising, Meta looks toward the twin tech innovations of the metaverse and AI for its business growth.

Last year, Meta released the latest version of its smart glasses, now infused with AI, that allow the wearer to livestream to Facebook and Instagram. Zuckerberg described this product as "a good example of how our AI and metaverse visions are connected."

This kind of innovation could help keep users attached to the company's services. In fact, the number of monthly active users for its products, excluding its Reality Labs division, ticked up from 3.7 billion to 4 billion in 2023.

And the Reality Labs segment, which develops products for the metaverse, generated quarterly revenue of over $1 billion for the first time in the fourth quarter.

To buy or not to buy Meta stock

Meta's success is far from assured in these new technologies. For instance, management says its investments in the metaverse "may only be fully realized in the next decade."

Another consideration is that Wall Street analysts estimate a median price target of $525 for its stock. This indicates a belief in some upside for Meta shares, although analysts don't expect the outsize growth experienced over the past year.

This assessment by analysts combined with rising advertising income and Meta's investments in AI and the metaverse -- which can extend its reach beyond computer and mobile phone screens -- mean Meta stock is a buy.

That said, the stock has an uphill climb to outperform in the way it did over the past year. The company experienced a specific confluence of factors that propelled its stock to gains eight times greater than the S&P 500 in 2023.

But long-term prospects look promising, especially if efforts, such as its Meta glasses, can develop into significant revenue streams to help the company diversify beyond advertising.