Holding shares of growing companies is one of the best ways to build wealth, and the magic of compound interest can take a small amount of money a long way. Just $500 a month invested in stocks at an average annual return of 10% -- the historical return of the S&P 500 index -- would grow to be worth $8.6 million in 50 years.

Here are two growing companies that could perform somewhat better than the market averages.

1. Floor & Decor Holdings

Floor & Decor Holdings (FND 2.66%) is a leading supplier of hard surface flooring products. As of June, it operated 203 warehouse stores and five design studios across 36 U.S. states. The stock pulled back from its previous high over slowing sales that can be traced back to inflation and lower consumer spending that has hurt many retailers this year. 

Stocks generally follow a company's revenue and earnings growth over the long term, and this is why Floor & Decor could be a special growth stock. Over the last 10 years, revenue and earnings per share grew 29% and 35%, respectively, on an annualized basis.

Management still sees plenty of expansion opportunity with its warehouse stores. Over the next decade, the company believes it can open at least 500 more stores in the U.S. alone, representing a mid- to high-teens annual growth rate. That means if Floor & Decor can keep customer traffic growing, it should continue to grow earnings per share at a high double-digit rate to fuel the stock higher.

Customers are attracted to the company's large stores that are well lit and present flooring products in many different design spaces. Despite the company's recent decline in comparable store sales,  management is confident it can gain market share over the long term and continue to grow comp sales.

The stock's forward price-to-earnings (P/E) ratio of 38 looks expensive, as it is well above the S&P 500 average earnings multiple of 25, but the market is willing to pay a premium because of the attractive long-term growth opportunities in the home improvement market. Despite years of growth, Statista estimates the market will expand another 15% to reach $621 billion by 2025.

With those tailwinds, Floor & Decor's profitable business model, leading brand, and wide selection should deliver great returns for long-term investors.

2. Casey's General Stores

Another attractive business with a lot of room for growth is Casey's General Stores (CASY 0.71%). This is a growing chain of small convenience stores scattered across the Midwest. The company's roots date back to 1968, which shows this is a time-tested retail store that has seen several recessions in the economy but keeps on growing.

Casey's grew revenue and earnings at an annualized rate of 8% and 16%, respectively, over the last decade. That was enough to push the stock up 273% over the last 10 years, and the stock recently hit new highs following another strong earnings report.

Further growth in same-store sales and controlled operating expenses drove an 11% increase in earnings per share for the fiscal quarter ending July 31. These are relatively strong numbers for the retail industry right now.

Casey's footprint in rural areas works to its advantage. Many people will stop for gas and tend to make impulse purchases of snacks and beverages. The number of fuel gallons sold, a key performance metric the company reports, notched a small increase over the year-ago quarter. But Casey's experienced strong demand in prepared food, where the company earns a healthy profit. Casey's is seeing strong sales for its made-from-scratch pizza, which it's known for, in addition to snacks, candy, and beverages.

While Casey's already has a large footprint of over 2,500 stores, it operates in only 16 states, so there are potentially thousands of stores it could open across the U.S. in the coming decades. 

The stock historically trades at an average P/E between 20 to 25, which means the share price just continues to climb along with the growth of the business. Casey's should continue to grow earnings at double-digit rates as it opens more stores and grows same-store sales. That should spell market-beating returns for long-term investors.