When publicly traded companies earn money, they often let investors share those profits by distributing dividends -- paying them a set amount of money for each share of its stock they own. Dividends are a great way for investors to generate some extra income on a steady basis, but just as the IRS gets a piece of your regular earnings, so too does it impose taxes on dividends.

Taxes on ordinary dividends

If you own stocks that pay dividends in an ordinary taxable brokerage account, you'll need to pay taxes on those dividends for the year that you receive them. If you're earn dividends in 2016, you'll pay taxes on the income when you file your 2016 taxes. The amount of tax you'll pay on them depends on whether your dividends are considered "qualified."

Qualified for what? Qualified to be taxed at the current long-term capital gains rate. For most U.S. taxpayers in 2016, that's 15%. Non-qualified dividends, however, are taxed as ordinary income. So if, for example, your salary puts some of your income into the top 35% bracket, any non-qualified dividends you receive will also be taxed at 35%. Qualified dividends are therefore much more appealing from a tax perspective.

Generally speaking, dividends paid by U.S. companies with normal structures are considered qualified. Some foreign corporations' dividends are qualified too. Additionally, for your dividend income to be considered qualified, you need to have held the dividend-paying stock for a certain period of time. If you've owned a stock for more than 60 days during the 121-day period that began 60 days before the ex-dividend date, the associated dividend will usually be qualified.

Taxes on dividends from a 401(k)

When you open a 401(k), you get several options for investing your retirement money. Some 401(k)s let you invest in individual stocks that pay dividends, but many limit you to mutual funds that accumulate dividend income and pay it to investors in regular distributions.

Either way, the tax-deferred nature of the 401(k) means that you won't pay taxes at the time that those dividends are paid into your 401(k). Rather, you'll be taxed only once you start taking money out of your 401(k), typically after retirement. So if you receive a dividend in your 401(k) in 2016 but don't take 401(k) withdrawals until 2020, you won't start to pay taxes on that dividend until 2020.

There is a downside, however. Once you start making withdrawals, your distributions will be taxed as ordinary income. Therefore, the tax you wind up paying on dividends from a 401(k) could end up being higher than what you would've paid had you held those dividend-issuing stocks in a taxable brokerage account.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center, in general, or this page, in particular. Your input will help us help the world invest, better! Email us at knowledgecenter@fool.com . Thanks -- and Fool on!

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.