Meta Platforms (META -0.05%), the company behind popular social media apps such as Facebook, Instagram, and WhatsApp, has been one of the hottest stocks to own this year. Up over 180%, its returns have dwarfed other big tech stocks; Alphabet and Microsoft are up over 50%. Shares of Tesla have risen by more than 90%.

A stronger ad market and a more optimistic outlook for the tech company has helped propel Meta to a valuation of more than $870 billion. Is the stock headed for a $1 trillion market cap, and is it worth buying right now?

Why Meta Platforms' stock has been on fire in 2023

This year has been a good one for Meta Platforms for a couple of reasons. First, the stock is rebounding from a horrendous year in 2022 when its shares fell by 64%. Its valuation arguably reached a low that it shouldn't have as it was badly oversold. That much is evident just by looking at the incredibly low price-to-earnings multiple it was trading at by the end of the year.

META PE Ratio Chart

META PE Ratio data by YCharts

When it rains it pours, and investors were dumping the tech stock in droves, as if Meta were going out of business. But that gross overreaction was met with a huge wave of bullishness this year, as the stock started to gain momentum out of the gate.

Between an improving ad market and more excitement around growth stocks thanks to artificial intelligence (AI) and ChatGPT, investors haven't been nearly as concerned with Meta's persistent multibillion operating losses on its metaverse venture.

Is the next stop $1 trillion?

Currently, Meta's stock would need to rise just another 15% for it to hit a $1 trillion valuation. At this stage, with the markets looking bullish and growth investors piling into Meta and other tech stocks, it looks probable that it will reach $1 trillion -- it's just a matter of when. With hopes that interest rate increases may be over and inflation slowing down, those are two reasons already why Meta's stock and growth-oriented companies in general may be heading higher in the weeks ahead.

Meta is also coming off a strong quarter, reporting 23% revenue growth for the period ending Sept. 30, with sales topping $34.1 billion.

Why it may not stay there

Although a $1 trillion valuation looks likely for Meta in the near future, I wouldn't count on the stock staying there for too long. The company warned investors on its most recent earnings report that its costs will rise next year.

In addition to Reality Labs still being a money pit for the business, the company said it is going to incur higher infrastructure costs. It also says that it will add staff to support growth. And it also admits that there is a "sizable hiring backlog" that will result in an accelerating headcount next year.

Meta has laid off approximately 21,000 workers over the past 12 months in an effort to curb its costs, and it looks as though it may have been overaggressive in those efforts. As those labor costs creep back up, and particularly as it invests more heavily into AI, next year could be one that sees Meta's profits come under pressure again, which could spook investors.

Should you invest in Meta's stock?

Meta has been a great stock to own this year and it's likely going to hit a $1 trillion market cap in the near future. But it's still far from being a safe stock.

It wasn't all that long ago that the company's growth rate was negative and the metaverse was a big problem for investors. A couple of good quarters doesn't change the reality that the metaverse can and will weigh down Meta's profits for years. AI could to the same. Investors should be careful not to assume that it's smooth sailing from here on out because the company is facing rising costs and while its recent growth rate is encouraging, it may not necessarily be the start of a new trend for Meta.

It may get to $1 trillion, but investors shouldn't expect Meta's stock to stay above that threshold for too long.