Many companies pay out dividends to their stockholders. If you own stock in a company that pays dividends, you can receive those dividends as cash, or you can choose to have those dividends reinvested. That is, you can use those payments to buy more company stock.

The potential benefit of this approach is clear when you look at the stock market's historical returns with and without dividend reinvestment: The S&P 500's average return from 1928 through 2017 was about 7.6 percent, but if all dividends had been reinvested, it would have been about 11.5 percent, according to NerdWallet's analysis of data posted online by Aswath Damodaran, a finance professor at New York University.

There are two main ways to set up a dividend reinvestment plan:

If you invest through a brokerage account, many brokers will let you choose to reinvest your dividends, rather than receive them as payouts.

You can invest directly in the dividend reinvestment plan, or DRIP, offered by the company you want to invest in, assuming it has one.

Company DRIPs have substantially different features than brokerage account reinvestment plans. When choosing between the two approaches, keep in mind that company DRIP plans are solely for people who want to invest in individual stocks — and specific stocks, at that. If you want the easy diversification of a mutual fund (a single investment that invests in many companies on your behalf), then go with a brokerage account.

Also, if you just want to reinvest dividends, it may be simpler through a brokerage account, which offers a one-stop shop for investing.

But here's when company DRIPs can make sense: if you don't have much money, but you want to get started investing in an individual company.

The main value of a DRIP, says DRIP Investor newsletter editor Chuck Carlson, is that in addition to reinvesting their dividends, investors generally can send in money to purchase fractional shares — $50, say, will buy a piece of a $130 stock.

That's because most company DRIPs offer "optional cash investments" on a fractional-share basis, Carlson says. Once you are enrolled, he says, "You can send money directly to the company — a check or automatic debit or whatever — and you can buy additional shares."

The best part? The minimum investment amount tends to be small, such as $10 to $50, even if the share price is higher than that.

While brokers are likely to offer dividend reinvestment plans (through which fractional shares may be purchased), they are less likely to let you purchase a stock outright for less than the full share price. That said, some apps offer that feature. For example, Motif and Stash let you buy individual stocks via fractional shares.

In addition to purchasing stock by reinvesting your dividends, companies that offer DRIPs often will let you buy additional stock on a fractional basis.

In DRIPs, companies sometimes offer their stock at a discount to the market price (in some cases, the discount is available only on the shares purchased through dividend reinvestment, not the optional cash purchases).

Depending on the specific plan's fees, investing in a DRIP may be cheaper than purchasing through a broker.

The companies follow their own schedules for investing your money, however, and it may be days between the time the company receives your "buy" request and the time it invests your money, and the same goes for selling shares. This can be a good way to avoid panic selling, but it's not for everyone.

To enroll in a DRIP, some companies require that you're already a shareholder. One solution is to buy a single share from a broker and then ask the broker to register that share in your name.

There's usually a fee to sell shares. It's not unusual to see a flat fee of $5 to $15, plus a per-share sale fee, Carlson said. And there may be enrollment and other fees.

Managing multiple company DRIPs may entail more paperwork than holding a single brokerage account. And it's important to keep your records straight, because generally you owe tax on dividends in the year you received them, even if those dividends were immediately reinvested.

If the company model seems too onerous, you might want to stick with setting up dividend reinvestment with a discount brokerage, where you can access multiple investment types — individual stocks, mutual funds and exchange-traded funds, or ETFs, to name a few — from the convenience of one account.

"For most people, it's easier to do that because you just have one account and you don't have to worry about more paperwork and more accounts to keep track of," says Charles Rotblut, vice president of the American Association of Individual Investors, a nonprofit group that aims to educate investors.

However you do it, reinvesting dividends can be a powerful way to boost your returns over the long term.

Andrea Coombes is a writer at NerdWallet. E-mail: acoombes@nerdwallet.com. Twitter: @andreacoombes.