The markets created a lot of headaches for investors this year, but this is no time to second-guess past mistakes. History shows that lower valuations set the stage for wealth-building gains over the long term, and there are plenty of strong companies with enormous growth opportunities to buy right now.

While no one knows what will happen in 2023, it might be helpful to discuss two fast-growing companies that are still in the early innings of capturing a sizable addressable market. These two stocks should be trading significantly higher in 10 years than they are today and could set your long-term portfolio up for life.

1. Bill.com is just scratching the surface of its potential

The migration to digital services is creating explosive growth opportunities for companies serving enterprises large and small. Bill.com (BILL 1.69%) is a cloud-based software platform that helps small businesses automate back-office operations like managing invoices, payments, employee expenses, and other accounting tasks. The company has over 400,000 businesses using the platform, but it's scaling up very fast. In the most recent quarter (Q1 of fiscal 2023), revenue of $230 million nearly doubled year over year, and a look at the growth trends suggest Bill.com will be a much larger business in another decade.

Bill.com is gaining such strong traction because it has partnerships with leading financial institutions and over 6,000 accounting firms. This provides an endless stream of leads for new customers, and once a small business integrates Bill.com's platform into its operation it becomes a very sticky relationship. Bill.com's net dollar retention rate was 131% in the last quarter, meaning that existing customers spent 31% more with the company than they did last year.

The company is gradually making strategic acquisitions to fill out its offering. It just recently acquired Finmark, which provides tools to simplify financial planning and cash flow analysis. Bill is clearly turning into an indispensable subscription service for small businesses, and that could translate to monster returns for investors.

There are 30 million small businesses in the U.S., and more than twice that globally. Bill.com has a huge runway to keep growing, so now would be an ideal time to take advantage of the market sell-off and add shares to your portfolio. The company's market cap currently sits at just under $12 billion, which is very low compared to the size of Bill.com's addressable market.  

2. Chewy is building an unstoppable e-commerce business

Another attractive investment opportunity that could lead to life-changing returns is online pet spending. Amazon and other large retailers are great destinations to shop for general merchandise, but these large stores leave something to be desired in specialty markets like pet supplies.

Chewy (CHWY -0.12%) saw revenue nearly triple over the last five years. Its autoship feature, expanding healthcare services, and wide selection of goods won over a growing number of customers, which now total over 20 million. These customers find a level of personalized service at Chewy that is absent at a do-it-all e-commerce store.

One positive development for the company this year is that new customers spend money in categories that have historically been very sticky for Chewy, such as consumables and healthcare. Chewy just recently launched its first private-label brand in pet wellness, Vibeful, which is a new line of supplements. This will go a long way to further cementing its customer relationships and create sustainable growth.

Chewy is building a world-class operation in a pet market estimated at around $100 billion with more of that annual spending shifting online. The market is focused on near-term economic headwinds, which has sent the stock down, but investors who focus on where the ball is moving long-term could realize substantial gains over the next 10 years and beyond.