Alphabet (GOOGL 10.22%) (GOOG 9.96%) and Meta Platforms (META 0.43%) reported fourth-quarter earnings not too long ago. The search giant's ad revenue disappointed Wall Street, sending shares lower. But the social media juggernaut blew past estimates, helping propel the stock 20% higher right after the announcement.

Meta's stock significantly outperformed Alphabet's in the last 12 months. However, it's easy to be confident that both of these businesses can reward shareholders in the long run.

If you're ready to invest $1,000, these two FAANG stocks could double your money over the next five years. Here's why.

Limited competition

One sign of a great business is the presence of limited competition. In other words, investors should look at companies that truly dominate their respective industries.

Alphabet commands more than 91% share in the global search market. That figure has remained relatively stable, despite the introduction of ChatGPT and its integration with Microsoft's Bing. And with just under 4 billion monthly active users, no social media enterprise holds a candle to Meta's wide reach.

Consequently, network effects underpin the economic moats of these companies. They are simply too massive and powerful, and they get stronger as they grow. This reduces the likelihood that either business will get disrupted anytime soon.

Alphabet (39% share) and Meta (18%) are the two top players in the worldwide digital advertising market. As long as they continue to find ways to draw in users and boost engagement, they have minimal risk of losing their industry-leading positions.

Financial discussion

After the ad market took a hit due to macro headwinds in 2022, things are starting to pick back up. Last year, Alphabet's sales rose by 9%, while Meta, which generates virtually all of its revenue from ads, saw sales jump 16%. In the last five years, both companies posted annualized revenue growth in the high teens.

Investors should have confidence that they can at least register double-digit sales gains for the foreseeable future. Grand View Research estimates that in the U.S. alone, digital advertising revenue will increase by 14% per year until 2030, which provides a powerful tailwind for both Alphabet and Meta.

Not only that, but these companies also have other potential growth drivers that can help them. Alphabet's Google Cloud segment is reporting faster revenue gains than the overall business. And Meta continues to invest heavily in metaverse ambitions, which could pay off one day.

Thanks to their strong operating margins, earnings could grow at an even faster clip. According to Wall Street analyst estimates, Alphabet's and Meta's earnings per share figures will rise at compound annual rates of 15% and 21%, respectively, between 2023 and 2026.

Valuation matters

Having dominant industry positions, coupled with impressive growth prospects and profitability, can only help investors if shares are trading at reasonable valuations. Paying too high a price, no matter how wonderful a company is, can still lead to terrible returns over time.

I think the current setup for prospective investors is a very favorable one -- and this is after these stocks soared in the last 12 months.

Alphabet shares sell for a forward price-to-earnings (P/E) ratio of 21.5, while Meta's are at a multiple of 23.4. Given all the positive attributes outlined above, these valuations are compelling. Even better, they are in line with the S&P 500's forward P/E of 22.2, despite the valid argument that they are superior businesses.

There's a clear path for both of these top tech stocks to potentially double your $1,000 investment over the next five years.