Buying and holding on to solid companies for a long time is a time-tested way of growing one's wealth. This strategy allows investors to benefit from compounding and take advantage of secular growth opportunities.

Of course, investors faced volatility over the past year or so amid rising interest rates and surging inflation, but it's worth remembering that the stock market averages solid returns over the long run. That's why if you have $3,000 in free cash not needed to pay down short-term debt, manage your monthly budget, or boost a rainy day fund, it might be a good idea to put that money toward shares of Airbnb (ABNB -0.39%) and Shopify (SHOP -1.62%), two companies that are built for long-term growth thanks to the fast-growing markets they serve.

Let's look at the reasons why.

1. Airbnb

A $3,000 investment in Airbnb stock during its initial public offering in December 2020 is now worth around $2,350. The vacation rentals marketplace may have eroded investors' wealth since making its stock market debut, but it has been in fine form so far this year with gains of 34%. Moreover, the stock's decline seems a tad unjustified given that it regularly reported solid growth since going public.

Chart showing Airbnb's revenue rising since early 2021.

ABNB Revenue (TTM) data by YCharts

In 2022, for instance, Airbnb reported 40% growth in revenue to $8.4 billion. The company became profitable on a GAAP basis for the first time last year with a net income of $1.9 billion. It posted adjusted earnings of $2.79 per share, compared to a loss of $0.57 per share in the prior year.

Airbnb's terrific growth last year was driven by a 35% increase in gross bookings value on its platform to $63.2 billion. This was, in turn, driven by a 31% increase in nights and experiences booked on the Airbnb platform. Precedence Research estimates that the global vacation rental market could clock 17% annual growth through the end of the decade, which should pave the way for Airbnb to keep growing at a solid pace until 2030 at least.

Airbnb is pulling the right strings to make the most of this fast-growing opportunity. The company ended 2022 with 6.6 million active listings, an increase of 900,000 listings compared to the end of 2021. This was Airbnb's highest-ever listing count. The company credits the growing demand for travel and the supplemental income that Airbnb hosts can earn by listing their properties.

More importantly, the company took steps to make it easier for hosts to get on its platform with new programs such as Airbnb Setup. The program led to a 20% increase in the number of active hosts recruited onto the Airbnb platform through experienced hosts who already use Airbnb to list their properties.

All this indicates why Airbnb's top-line growth should remain solid in 2023 and 2024, growing at a consistent 15% annually.

Chart showing rise in Airbnb's revenue estimates for this fiscal year and the next.

ABNB Revenue Estimates for Current Fiscal Year data by YCharts

If the company can sustain this pattern of delivering 15% annual revenue growth through 2030, its top line could jump to $22 billion by 2030. Airbnb stock now trades at 9 times sales, which is on the expensive side. But the company's solid share of the vacation rentals market means that it could justify that valuation in the long run.

If Airbnb continues trading at 9 times sales in 2030, its market cap could jump to $198 billion. That would be 2.7 times the current market cap of $72 billion. More specifically, a $3,000 investment in Airbnb now could be worth more than $8,000 after seven years. That's why investors looking for a growth stock should consider buying it before it flies higher.

2. Shopify

Shopify went public in May 2015, and it delivered outstanding gains to investors ever since. A $3,000 investment in Shopify during its IPO is now worth a whopping $44,000. That gain comes despite the massive drop in the stock price since the end of 2021. As it stands, Shopify stock is trading 72% off its highs. This explains why its price-to-sales ratio of 10 is well below its five-year average of 30.

Buying Shopify at this relatively attractive valuation could turn out to be a solid long-term move. That's because the company provides an e-commerce platform that allows merchants to build online stores, sell across multiple marketplaces and social media channels, and collect payments from customers. It also provides marketing solutions to merchants and enables them to sell their products in international markets.

The e-commerce market's secular growth over the years has helped Shopify increase its revenue. The company ended 2022 with a 21% increase in revenue to $5.6 billion, up from just $205 million in 2015. The company's revenue increased at a compound annual growth rate (CAGR) of 60% in the past seven years, driven by an increase in the adoption of its e-commerce solutions.

Shopify reported $197 billion in gross merchandise value (GMV) in 2022, compared to $7.7 billion in 2015. GMV refers to the value of goods sold through Shopify's platform, so the massive growth in this number over the years suggests that the adoption of its offerings is increasing. The demand for Shopify's offerings could continue improving in the long run, as the e-commerce market is expected to generate $17.5 trillion in revenue by 2030, compared to $4.2 trillion in 2020.

This explains why Shopify's top-line growth is expected to remain healthy over the next three years.

Chart showing Shopify's revenue estimates declining only slightly from this fiscal year to 2 years ahead.

SHOP Revenue Estimates for Current Fiscal Year data by YCharts

The above chart indicates Shopify's revenue could hit almost $11 billion in 2025, clocking a CAGR of 25% from 2022 levels. Assuming Shopify could grow its revenue at even 20% a year from 2026 to 2030, its top line could hit $27 billion at the end of the decade. Assuming the company trades at even 5 times sales in 2030 instead of the current price-to-sales ratio of 10, its market cap could hit $135 billion by 2030.

That points toward a 2.3x jump compared to Shopify's current market cap, suggesting that this e-commerce stock could turn a $3,000 investment made now into almost $7,000 by 2030.