Many growth stocks are down sharply from levels seen earlier this year. But not Facebook (NASDAQ:FB). Quite the opposite: the tech company's shares have been slowly but surely rising to record levels. On Tuesday, for instance, Facebook stock hit an all-time high of $311.35 at one point during the trading day. Even the stock's closing price of $306.32 on Tuesday is up 12% year to date, easily outperforming the S&P 500's 8.5% gain over the same timeframe.

Interestingly, shares still trade at an attractive valuation, even after the stock's strong performance recently.

Facebook CEO Mark Zuckerberg.

Facebook CEO Mark Zuckerberg. Image source: Facebook.

Facebook's revenue could surge this year

After facing a significant slowdown in its revenue growth last year as advertisers paused, reduced, or recalibrated their ad campaigns during peak lockdowns and sheltering last year, the social network returned to strong momentum as it closed out 2020. Fourth-quarter revenue rose 33% year over year -- an acceleration from 11% growth in Q2 and 22% growth in Q3. 

"This was a strong quarter for our business, as the acceleration of online commerce we've seen during the pandemic continued into the holiday season," explained Facebook chief operating officer Sheryl Sandberg during the company's fourth-quarter earnings call.

Even more, despite continued significant uncertainty in some advertising verticals, Facebook CFO Dave Wehner said he expects Facebook's year-over-year revenue growth rates to "remain stable or modestly accelerate sequentially in the first and second quarters of 2021."

Notably, however, Wehner did warn that ad targeting headwinds in 2021 and the lapping of strong comparisons in the second half of the year will put pressure on the company's year-over-year growth rates during Q3 and Q4. But Facebook is notoriously conservative when it comes to its outlook. Sure, a deceleration in the second half of the year is very likely (as Facebook warns), given the company's tough comparisons. That said, Facebook's decelerated revenue growth rates in the second half of the year will likely still be solid double-digit rates that are driving meaningful earnings growth.

Shares may be undervalued

Despite Facebook demonstrating strong business momentum and management guiding for a potential acceleration in the near term, shares trade at a very conservative valuation. The stock has a price-to-earnings ratio of just 30 -- a low level considering analysts, on average, expect Facebook's earnings per share to grow at an average rate of nearly 22% annually for the next five years.

In short, there's good reason for the stock's slow but steady rise recently: The tech stock looks like an attractive long-term investment.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.