Buying and holding solid companies for a long time is a tried-and-tested way of making money in the stock market, as this strategy not only allows investors to benefit from the power of compounding but also allows them to take advantage of secular growth trends.

For instance, a $1,000 investment in Meta Platforms' (META 0.43%) stock a decade ago is now worth more than $7,000 despite last year's crash in tech stocks. This impressive run over the past decade has brought Meta close to a $1 trillion valuation now, and it could join that club very soon. Meta, however, isn't the only company that could cross the $1 trillion market cap milestone.

Let's take a closer look at two stocks (Meta Platforms is one of them) that could see their valuations top $1 trillion within the next decade.

1. Meta Platforms

Meta Platforms' stock shot up an impressive 181% in 2023, bringing the company's market cap to $868 billion. So, the social media giant's stock needs to jump another 15% to hit the $1 trillion milestone. A closer look at Meta's growth and the prospects of the digital advertising market in which it operates suggests that it could hit that mark very soon.

The company's revenue jumped 12% year over year in the first nine months of 2023 to $94.8 billion, and the good part is that its top-line growth accelerated each quarter. Meta's fourth-quarter revenue guidance of $36.5 billion to $40 billion indicates that it could finish the year with a total revenue of $133 billion based on the midpoint of its forecast. That would be a 14% jump over last year when Meta reported annual revenue of $116.6 billion.

More importantly, Meta is expected to deliver healthy double-digit revenue growth in 2024 and 2025 as well.

META Revenue Estimates for Current Fiscal Year Chart

META Revenue Estimates for Current Fiscal Year data by YCharts.

If Meta does hit $168 billion in revenue in 2025 and maintains its five-year average price-to-sales ratio of 7.5, its market cap could hit $1.26 trillion within the next three years. A simple reason why Meta can achieve that milestone is the secular growth opportunity in the digital ad market where the company is a key player.

Precedence Research estimates that the global digital ad market could be worth $1.26 trillion in 2032 -- up from $500 billion last year -- at a compound annual growth rate of 9.7%. So, Meta controlled 23% of this market at the end of 2022 based on the revenue it generated last year and the total size of the market, as per Precedence's estimate.

A similar share after a decade would propel the company's annual revenue to $290 billion. But Meta is growing at a faster pace than the digital ad market right now, and it could sustain that momentum for a long time considering the large installed base of users across its family of apps such as Facebook, Instagram, and WhatsApp.

The company reported almost 4 billion monthly active users across its family of apps in the third quarter, up 7% over the prior year. Meta is giving advertisers artificial intelligence-enabled tools to tap its huge user base and generate stronger returns on their ad spending. All this indicates that Meta can easily cross the $1 trillion valuation and become a much bigger company over the next decade.

2. ASML Holding

Dutch semiconductor equipment giant ASML Holding (ASML 2.04%) is another candidate that could join the $1 trillion club within the next decade. The company currently has a market cap of $270 billion, which means that the stock needs to jump significantly going forward. But ASML seems capable of doing that thanks to the booming demand for its advanced chipmaking equipment.

Analysts anticipate the company will finish 2023 with revenue of almost $30 billion, an increase of 25% over last year. However, ASML has warned that a cautious spending environment in the semiconductor industry next year could hamper its growth. Orders for ASML's chipmaking equipment declined a steep 42% year-over-year last quarter.

However, ASML's growth is expected to accelerate once again starting in 2025, as the following chart tells us.

ASML Revenue Estimates for Current Fiscal Year Chart

ASML Revenue Estimates for Current Fiscal Year data by YCharts.

That's not surprising, as ASML can take advantage of the secular growth opportunity in the semiconductor market. The company is the only supplier of extreme ultraviolet lithography (EUV) machines which are used to manufacture advanced chips based on small process nodes. These advanced chips are in strong demand as they are both energy-efficient and carry higher computational power than chips manufactured on a larger process node.

Not surprisingly, their demand is expected to jump substantially in the long run. Taiwan Semiconductor Manufacturing, popularly known as TSMC, expects that sales of 3 nanometer chips alone could hit $1.5 trillion over the next five years. Given that ASML's EUV lithography machines are the ones that make these chips, the demand for its chipmaking equipment should remain strong in the long run.

This explains why ASML is confident of achieving its 2030 revenue target of 44 billion euros to 60 billion euros despite the slowdown it is anticipating in 2024. Also, analysts forecast the company's earnings will increase at an annual pace of 24% for the next five years. Assuming it can sustain an annual earnings growth rate of 20% for the next decade, ASML's bottom line could jump to $132 per share in 2033 (based on this year's forecast earnings of $21.29 per share).

ASML has a five-year average forward earnings multiple of 35. If we assume a forward earnings multiple of 30 after a decade, ASML's stock price could jump to $3,960 in 2033. That would be nearly 6 times its current stock price, which also means that ASML's market cap could exceed $1 trillion within the next 10 years, and investors would do well to buy it before it soars higher.