Most investors know that Walmart is the world's biggest brick-and-mortar retailer, but you might be surprised to learn that Home Depot (NYSE:HD) is second behind Walmart in terms of its market cap with a valuation of roughly $231 billion today.

The home-improvement specialist is the U.S.'s second-most valuable brick-and-mortar retailer and dominates its sector. In terms of market cap, it's more than twice the size of rival Lowe's.

When they launched the company in 1978, Home Depot's founders followed a strategy popular among mass merchandisers today and offered a wide assortment of goods, low prices, and good customer service. Its first stores in the Atlanta area were significantly bigger than those of its competitors, which helped drive the company's initial momentum and positioned its brand as a one-stop-shop for home improvement. 

On Sept. 22, 1981, the company went public at $12 a share, or a split-adjusted price of just $0.03 a share, and by 1986 it had $1 billion in annual sales. This year, it's on track to generate more than $100 billion in high-margin revenue.

Let's take a look back at Home Depot's stock history to find out how much you'd have today if you had invested $1,000 at its IPO.

A Home Depot employee carrying two cans of paint through an aisle.

Image source: Home Depot.

Home Depot's stock splits

At the IPO, $1,000 would have allowed you to purchase roughly 83 shares of stock. Home Depot has split its stock 13 times over the course of its history, though those splits came mostly in its early days as a publicly traded company and its last split came in 1999. The chart below shows each split, along with how it drove increases in shareholder value. 

Split Record Date Payable Date Price Shares you would own if you bought 83 shares at the IPO (approx. $1,000)*
3 for 2 01/05/1982 01/19/1982 $21 124.5
5 for 4 04/12/1982 04/30/1982 $17 1/4 156
2 for 1 11/29/1982 12/07/1982 $49 1/2 312
2 for 1 06/01/1983 06/08/1983 $54 624
3 for 2 09/08/1987 09/22/1987 $35 7/8 936
3 for 2 06/14/1989 06/30/1989 $39 1,404
3 for 2 06/14/1990 07/06/1990 $57 7/8 2,106
3 for 2 06/05/1991 06/26/1991 $65 3/4 3,159
3 for 2 06/11/1992 07/01/1992 $68 3/4 4,738.5
4 for 3 03/24/1993 04/14/1993 $59 1/2 6,302
3 for 2 06/12/1997 07/03/1997 $69 1/8 9,453
2 for 1 06/11/1998 07/02/1998 $85 7/8 18,906
3 for 2 12/02/1999 12/30/1999 $102 28,360

Source: Home Depot, *Number of shares has been rounded to the nearest half share

As you can see from the chart, your share count would have increased by a factor of 342 if you bought Home Depot stock at its IPO and held it through 1999. But there's more to the return-on-investment picture than its share splits and stock price appreciation. The retailer has also been a generous dividend payer over much of its history.

Home Depot's dividend history

Home Depot began paying quarterly dividends in 1987. While it's not a member of the Dividend Aristocrats -- that select group of companies that have raised their dividends every year for at least 25 years -- it nearly qualifies. Management has raised the dividend annually since 1987 with the exceptions of 2007, 2008 and 2009, when it took a pause during the housing bust. 

More recently, the company has gotten back to aggressively raising its dividend. Earlier this year, it hiked its quarterly payout by 32% to $1.36 a share. Investors who bought this stock during the IPO and held on would be getting a split-adjusted return of more than 150 times on their investment from Home Depot annually just from the dividends. When the company first started paying a dividend, it was offering just fractions of a penny on a split-adjusted basis. Today, the stock is yielding 2.5%.

Home Depot's massive returns

Between the growth of the stock price and the dividend increases, Home Depot has delivered incredible returns since its IPO. Instead of doing my own calculations, I turned to the company's website, which offers a handy calculator on its stock. According to the company, the stock's total return, which includes reinvested dividends, is 1,153,940% (a 27.7% annualized return). Of that, 713,000% comes from share appreciation while 440,000% is from dividend payouts.  

Based on those numbers, if you had invested $1,000 in Home Depot's IPO and reinvested the dividends, you would have approximately $11.5 million today. Because of inflation, your actual buying power would be more equivalent to $4.07 million in 1981 dollars. However, there's no denying that those are mind-boggling returns that underscore the remarkable power of compound growth. 

Home Depot's success story shows the immense rewards that can be reaped by investing early in a great company and holding the stock for a long time. Even a small initial investment can make you a millionaire several times over if your timing and stock picks are right.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.