Warren Buffett's Berkshire Hathaway started buying shares of home-improvement retailer Floor & Decor Holdings (FND 2.66%) in the third quarter of 2021. While investors don't know the exact price it paid or the day it made the purchase, I can say that Floor & Decor stock is flat since July 1, 2021 -- the first day of that year's third quarter. So it hasn't been a great investment over this time period.

But zooming out further, Floor & Decor has been a fabulous investment. The stock was trading right around $50 per share in July 2018, meaning it's doubled in value over just the last five years. For comparison, the S&P 500 is up about 63% during this time.

There's a concrete explanation for Floor & Decor stock's market-beating performance. And I'm happy to say that the company still has the same thing going for it now, which can lead to market-beating performance from here.

The last five years

Floor & Decor is a big-box home-improvement retailer like Home Depot and Lowe's, but it specializes in flooring materials and related products. As with any living, breathing business, there are a lot of moving pieces with this company. But at the risk of oversimplifying, I believe its success can be boiled down to a single contributing factor: opening new stores.

At the end of Q2 2018 (the period that ended on June 28 of that year), Floor & Decor had 88 locations. The company isn't expected to report its financial results for Q2 2023 until early August, so investors don't know what its store count was at the exact five-year mark. However, management announced that it opened its 200th store in Metairie, Louisiana, on May 10.

In short, Floor & Decor has more than doubled its store count in five years. This rapid expansion has been successful. New stores are performing comparably with older stores, meaning the company's revenue has more than doubled during the last five years as well, as the chart below shows.

FND EPS Diluted (TTM) Chart

FND EPS Diluted (TTM) data by YCharts.

The chart also shows that Floor & Decor hasn't done as good of a job lately with increasing its earnings per share (EPS). Investors can blame higher labor costs and a recent pullback in same-store sales for this. However, roughly doubling EPS in a five-year span is still quite good.

The next five years

Opening new stores is the biggest reason Floor & Decor stock is going up faster than the stock market. And over the next five years, the company intends to open a lot more stores.

Consider that Floor & Decor ended 2022 with 191 of its large format stores (the company also operates some smaller format stores). For 2023, the company is on pace to open at least 32 new locations. That's more than 16% unit growth in a single year.

Floor & Decor's 16% unit growth in 2023 isn't a one-off. Management expressly intends to open new locations at about a 15% to 20% annual rate. At this pace, the company could have about 400 locations five years from now, which would still be below its long-term goal of having 500 locations.

Will opening this many locations cause Floor & Decor stock to double over the next five years? I'm not sure. It's worth pointing out that the stock right now trades at about 37 times its trailing earnings, which is a premium to the average stock market valuation.

FND PE Ratio Chart

FND PE Ratio data by YCharts.

Having a premium valuation makes sense for Floor & Decor right now because it's still such a high-growth company. But in five years, it will have less growth ahead of it than it does now. Therefore, it's likely that its valuation will come down toward the stock market average.

If Floor & Decor's valuation comes down, then this could cap the stock's upside. That said, it also seems likely that the company will double its revenue over the next five years. And if management can find ways to reduce expenses, then its EPS could go up more than revenue, providing an extra boost to the stock price.

In conclusion, I'm not certain that Floor & Decor stock will double over the next five years. But the stock market goes up 10% per year on average. And I'm confident that Floor & Decor stock can do better than this for the foreseeable future, which still makes it a stock to buy today.