When my family was young, I bought dividend stocks to provide an income stream just in case I was out of work for any reason. With my daughter just completing her second year in college, I no longer need to worry about accessing the potential income stream I've created. (It has largely been dividend reinvested anyway.) I've done the heavy lifting, but now I'm doing some fine-tuning that has both reduced the taxes I pay and increased the income that hits my accounts. You might want to know about the somewhat obscure rule that's letting me achieve this goal.

The accounts that matter most for saving on taxes

If you're looking to avoid paying taxes on dividend income, a tax-advantaged retirement like an IRA is going to be your friend. Of the options available, a Roth IRA is likely to be the best choice. While you have to put after tax money into a Roth, the dividends and capital gains inside the account accrue tax free. And, more to the point, since you already paid tax on the money that went in, you don't have to pay taxes on the money that you eventually pull out.

A hand stopping falling dominos from overturning a stock of coins.

Image source: Getty Images.

Put simply, dividend stocks in a Roth IRA or other Roth account -- a Roth 401(k), for example -- can provide you with ongoing tax-free income in retirement. Loading up a Roth with high-yield dividend stocks can be a good long-term choice from a tax perspective. But there are some nuances here that you need to consider before you do anything.

For example, I started by shifting real estate investment trusts (REITs) from taxable accounts over to my Roths. REIT dividends are taxed at ordinary tax rates, so they have greater tax consequences than a typical company. Moving these into a Roth before other dividend stocks makes a great deal of sense.

My latest tax moves involve Canada

But there's another little wrinkle in the tax code that investors should know about, and that would be in the Canadian tax code. I own Enbridge (ENB -0.03%), Toronto-Dominion Bank (TD 0.63%), and Bank of Nova Scotia (BNS 0.29%). All three are Canadian companies listed on U.S. exchanges. Owning them in a taxable U.S. brokerage account requires the payment of Canadian withholding taxes. But Canada doesn't require withholding taxes if Canadian dividend-paying stocks are held in a U.S. tax-advantaged retirement account like a Roth.

Basically, I'm getting 15% more income just by putting these three stocks into a tax-advantaged retirement account. To be fair, I bought Bank of Nova Scotia in a Roth account, but I chose to move Enbridge and Toronto-Dominion from taxable accounts to my Roth accounts.

That necessitated selling the shares in the taxable account and buying them again in a Roth. There are clearly capital gains issues to consider, but I've been able to offset the gains I faced by capturing losses in other stocks I owned. So, overall, the moves ended up being a wash, in tax terms, with the net benefit being increased income (because of no longer paying Canadian taxes before I collect the dividend), a reduction in my current taxes (because of no longer paying U.S. dividend taxes each year), and the plus of setting up a long-term tax-free income stream for when I eventually retire.

There are some caveats. First, the income from dividend-paying stocks you put into a tax-advantaged account can't really be touched penalty-free until you reach retirement age. There's some wiggle room there with a Roth, but it gets complicated. It's still best to only own dividend stocks you view as long-term holdings in an IRA of any type. And you clearly need to be able to survive without the income from those dividends if you aren't at retirement age just yet.

The next issue that you need to consider before putting Canadian dividend stocks into an IRA is your broker. The tax benefit comes through only if your broker fills out the paperwork needed to make it happen. My broker is large and well known, and it has taken care of the paperwork. You'll probably want to call your broker to make sure you can avoid Canadian dividend taxes before you start buying such stocks in your IRA, just to make sure. Be prepared for a long call, though, as this issue is probably more complicated than what a front-line employee can cover.

Little moves add up to big savings

From a big-picture perspective, moving Enbridge and TD Bank into a Roth account wasn't a huge change. But the long-term impact will, over time, add up to a huge advantage. Saving the 15% Canadian dividend tax, not paying U.S. taxes on dividends, and eventually collecting a tax-free income stream in retirement will definitely enhance my long-term returns. And it shows that a little knowledge can be powerful when it comes to handling your own investments.