The stock market is sitting close to new highs, leading many growth stocks to trade at elevated valuations. It's getting harder to find strong companies with durable competitive advantages that don't trade at astronomical earnings multiples, but they are still out there if you know where to look.

Two stocks I would buy today are CarMax (KMX 0.82%) and RH (RH -0.30%) (formerly known as Restoration Hardware). These companies have delivered great returns for investors but still have plenty of growth opportunities ahead to drive market-beating returns for several years. Let's find out a bit more about them.

Five balls of money in a line of increasing size.

Image source: Getty Images.

1. CarMax: Gaining market share in the used car market

CarMax is the largest seller of used vehicles in the U.S. Its wide selection, competitive pricing, and customer-friendly sales process has delivered consistent revenue growth and market-beating returns for investors over the last decade. CarMax continues to invest in new services, such as online instant appraisals, which should further bolster its advantage in the used vehicle market.

CarMax possesses two important competitive advantages that investors should know about before buying the stock. First, it has a vast amount of data it can use to drive growth. CarMax appraises more than 8 million vehicles each year. It's not only got deep pricing data but also data on vehicles and website activity based on more than 300 million digital interactions every year.

A second advantage is the investment CarMax is putting into its omnichannel experience. In fiscal 2021, roughly 96% of customers that purchased a vehicle at CarMax first initiated their search on the company's website. Along with CarMax's commitment to no-haggle pricing, it is focused on building the most customer-centric car buying experience in the auto industry.

CarMax just recently acquired Edmunds, which complements the new online instant appraisal service it recently rolled out. By fiscal 2026, management believes it can sell 2 million units every year through retail and wholesale combined. Even then, CarMax would still command a small sliver of the used vehicle market. Management expects to deliver double-digit annualized revenue growth, consistent with its past performance.

At a trailing price-to-earnings (P/E) ratio of 19, this is an excellent business with a solid competitive moat trading at a 20% discount to the average P/E of the S&P 500 index, which includes the best businesses in the world. At this valuation level, CarMax should deliver market-beating returns over the long term.

2. RH: Targeting $25 billion in global revenue

RH's focus on building luxurious physical stores, or galleries, shows that the right brick-and-mortar concept can still work in today's retail environment, where e-commerce spending has increased as a percentage of total retail spending in recent years. However, RH is not totally dependent on those stores, since it operates an e-commerce channel, too. During the pandemic, revenue growth accelerated, and the company's momentum continued through its fiscal second quarter of 2021, with revenue up 39% year over year.

RH is benefiting from its premium branding in the home furnishings market, but this is a timely stock to consider buying right now for another important reason. Home spending has remained quite strong through 2021. This is a result of the suburban migration trend, which is leading to an increase in owned square footage and demand for furniture. "We believe the data and current trends support the argument of a more long-term and sustainable step change in consumer spending on the home," CEO Gary Friedman said in the company's Q2 earnings report. 

Management has ambitious plans to scale the business into one of the top consumer brands in the world. RH currently covers a range of design categories, including RH Interiors, RH Baby & Child, RH Ski House, RH Beach House, and other categories. It plans to launch RH Contemporary next year, in addition to plans for RH Couture, RH Bespoke, RH Color, RH Antiques & Artifacts, and others over the next decade. 

Management is targeting global revenues of $20 billion to $25 billion over the long term, which shows a long runway of growth compared to its trailing revenue of $3.5 billion. The stock trades at a P/E of 27, which is a fair price for a business with so much growth opportunity ahead.