This article was updated June 5, 2017, and was originally published August 27, 2015.

Without a doubt, the best way to get rich in the stock market is to buy quality stocks and hold onto them for the long haul. One smart way to take full advantage of the power of long-term investing is by reinvesting your dividends through a dividend reinvestment plan (DRIP). Here's why you need to enroll every one of your dividend stocks in a DRIP and the long-term impact doing this could have on your portfolio.

What is a DRIP?

A dividend reinvestment plan, or DRIP, is basically a way to automatically use your dividends to buy more shares of the stocks in your portfolio. You can set up a dividend reinvestment plan through many individual companies, but the easiest way to enroll all of your stocks in a DRIP is through your brokerage. If you do it this way, you won't have to worry about it when you buy new stocks – the benefits of dividend reinvestment will begin automatically.

Man standing on stacks of coins getting larger.

Image Source: Getty Images.

Of course, you could simply take your dividends and choose to use them to buy more shares, but there are some compelling reasons to use a DRIP instead.

  • No commissions: When your dividends are used to buy more shares through a DRIP, you won't be charged a brokerage commission. While today's sub-$10 brokerage commissions may not seem like much, consider that if you own 10 stocks that pay quarterly dividends, this benefit alone could be worth $400 per year.
  • No minimum investment requirements: Mutual funds allow you to reinvest dividends, but usually have minimum investment requirements. With individual stocks, you can enroll in a DRIP if you own just a single share.
  • The ability to purchase fractional shares: Let's say that you receive a $100 dividend payment from a stock that trades for $60 per share. If you purchase shares on the open market, you can only afford to buy one. However, with a DRIP, you can actually buy 1.67 shares. In other words, a DRIP allows you to put your entire dividend to work right away.
  • Dollar-cost averaging: When your stocks are cheaper, your dividends buy more shares and when they are expensive, you'll buy fewer shares. Through dollar-cost averaging, it's a mathematical certainty that over time, you'll end up with a better-than-average cost per share.
  • Makes investing automatic: A DRIP is a low-maintenance form of investing. Since you can simply buy an initial amount of shares and your brokerage will automatically make future purchases on your behalf, a DRIP encourages the most effective kind of investing and savings – buy and hold for years and years.

A couple of things to keep in mind

While there are many benefits to enrolling your stocks in a DRIP, there are a couple of negative aspects worth mentioning.

First, in a DRIP you have no control over your purchase price. In other words, if you think one of your stocks is getting "expensive" and another is more attractive, your DRIP will still purchase shares of the expensive stock at an inflated price. Now, I firmly believe that trying to time the market is a losing battle. Over time, the aforementioned benefit of dollar-cost averaging will work out in your favor, but you do give up some control over your investing by enrolling in a DRIP.

Also, bear in mind that even though your dividends are immediately used to buy more shares, they still count as dividends for tax purposes. Dividends reinvested in a DRIP are "qualified" dividends, meaning that they're taxed at a lower rate than ordinary income, but this is something to plan for so you don't get hit with an unexpected tax bill.

Why it's so important to reinvest your dividends

To understand why it's so important to reinvest your dividends, let's consider one of my all-time favorite dividend stocks, Realty Income Corporation (NYSE:O). We'll look at two scenarios that could have happened if you had invested $10,000 in the company at the time of its 1994 NYSE listing.

First, let's see what would happen if you simply decided to take your dividends in cash. Since Realty Income has such a fantastic dividend history, your 930 shares would have produced more than $32,000 in dividend income. And, your shares would have appreciated in value to $52,150, for a total investment gain of more than $74,000. Not too bad, right?

Well, it sounds great until you consider what would have happened if you decided to reinvest your dividends instead. Over the past 22 years, with dividends reinvested through a DRIP, your original $10,000 investment would have grown to about $363,000 – nearly five times the investment gain of the first scenario. Even better, your shares (since you accumulated more along the way) would now be producing more than $15,300 in annual income.

O Chart

This compounding effect of dividend reinvestment only gets more dramatic as time goes on. Over a 30 or 40 year time period, the decision to reinvest your dividends and simply let your investments grow could literally mean millions in additional investment returns. Enrolling all of your dividend stocks in an automatic reinvestment plan is perhaps the smartest (and easiest) investment decision you can possibly make.

Matthew Frankel owns shares of Realty Income. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.