Investors who shop for stocks like they do groceries are in the best position to be successful over time. Warren Buffett entered the hall of legends buying shares of great companies when they were on sale. Strong companies always bounce back.

If you have money available for investing that you won't need for at least five years, RH (RH 1.99%) -- formerly known as Restoration Hardware -- and Wayfair (W 1.96%) are two outstanding businesses that could deliver big gains from their current price levels. Let's find out a bit more about these two dirt-cheap stocks that could skyrocket.

Two people looking at computer in a luxurious home.

Image source: Getty Images.

1. RH: There are big profits in luxury furniture

Sometimes it can be helpful to follow billionaire investors when the markets get volatile, and what better investor to cherry-pick from right now than Buffett's Berkshire Hathaway, which owns shares of the leading luxury home-furnishings retailer RH.  

Average annual expenditures on home furnishings have steadily risen over the last several years, and trends suggest they should continue to rise for the foreseeable future. RH is benefiting from a migration of consumers to the suburbs, which is a trend that has been ongoing for a half-century. Because RH operates in the high end of the furnishings market, a combination of premium prices and strong demand has led to a windfall in profitability.

Revenue has increased by a cumulative 64% over the last five years to $3.7 billion through the third quarter of fiscal 2021, and its gross profit has climbed at a faster 147%. RH has a lot of up-front expenses, such as occupancy costs for its buildings and distribution centers. So as demand rises, much of the incremental revenue flows through to the bottom line.

Free cash flow, or the actual amount of cash the business generates from operations, more than tripled to $494 million over the last five years. The company is performing incredibly well in the context of a difficult retail environment, with revenue and adjusted earnings per share increasing 19% and 13%, respectively, in the fiscal third quarter.

The luxury home furnishings market is estimated to increase to $30 billion by 2023. Meanwhile, RH is working to make its business even more profitable. Management's growth strategy includes opening new galleries in major cities around the world while expanding to new sales categories and services.

The goal is to not only be a top curator and seller of luxury furniture but to also get into the business of selling an ecosystem of products and services to help customers conceptualize their whole living space, which could lead to higher repeat spending with RH.

The worries over the economy in the near term, particularly the supply chain and cost inflation, have sent the stock price down 36% year to date. But it's now much cheaper, trading at a price-to-earnings (P/E) ratio of 16. That is a relatively good value compared to the S&P 500 average P/E of 24. RH's superior growth prospects and inexpensive valuation could cause the stock to skyrocket once economic uncertainty clears.

2. Wayfair: Leading the online push

Similar trends in home furnishings are also benefiting the leading online seller of home goods, Wayfair. Its exclusive focus on the digital side means it is helped by the double boost of growth in home spending and in e-commerce -- with the latter a particularly strong tailwind for investors.

eMarketer estimates that global retail e-commerce will reach $7.4 trillion by 2025, up from $4.2 trillion in 2020. But even at that high level, e-commerce sales three years from now would represent only a quarter of total retail sales globally. That provides a long runway for Wayfair.

The company had some growth difficulty in 2021, but that was largely due to the tough year-over-year comparisons to the surge in demand in 2020. Last year, Wayfair reported $13.7 billion in total sales, slightly down from the previous year but up 50% over record 2019 sales.

Investments in fast delivery through its CastleGate logistics network and in its wide selection are leading to a growing base of customers who are spending more with Wayfair every year. Repeat orders now make up three quarters of annual sales, compared to just 57% of total sales in 2016. 

W PS Ratio Chart

W P/S ratio. Data by YCharts.

The stock has rarely traded lower than 1 on a price-to-sales basis. In fact, every time Wayfair has fallen this low, it usually doesn't stay this cheap for long. 

Investors who stay focused on the business and buy shares at these lows could see a nice gain in the next five years.