As a result, bonds can provide some stability for your portfolio to counter the volatility of stocks, while still generating income.

Do Bonds Have Special Tax Treatment?

Investors don’t typically look to bonds to outperform stocks, although this happens from time to time. Most investors view bonds as a way to help achieve stability and income in their portfolios. Then there’s the tax issue. If you own stocks, you don’t pay taxes on their growth until you sell them, and then you’re only taxed at the capital gains rate. Even dividends receive special tax treatment. But that’s not the case with bonds. Typically, you will receive income from bonds twice a year. This means they can have immediate tax consequences.

How Are Different Types of Bonds Taxed?

Here’s how the tax situation breaks down per bond type:

U.S. Treasury issues notes and bills that generate a federal income tax liability. They aren’t subject to state or local income taxes. Municipal bonds (sometimes known as “munis”) are tax-free at the federal level. If you buy them in the state where you live, they can be free of state and local taxes as well. These are sometimes called “triple free" for that reason. Corporate bonds have no tax-free provisions. You will pay taxes on any earnings from these debt securities. However, if they’re held in a retirement account like a 401(k) or IRA, you won’t owe tax on their earnings until you withdraw them in retirement.

Zero-coupon bonds have specific tax implications. These securities are sold at a deep discount and pay no annual interest. The full face value is paid at maturity, but there’s a catch. The IRS computes the “implied” annual interest on the bond, and you’re liable for that amount even though you don’t receive it until the bond matures. In other words, you’re taxed now on the income you haven’t received yet and might not receive for years to come.

Taxes on Municipal Bonds vs. Stocks

There’s a quick way to look at how a municipal bond compares with a stock on an after-tax basis. You can compute the taxable equivalent of a municipal bond’s return using this formula:

Figure your marginal tax rate, which is what you’ll pay on the next dollar of income you earn. Subtract it from 1. Then divide a muni yield by the result to get the taxable equivalent.

For example, if you’re going to be in the 24% tax bracket, and you’re considering a muni with a yield of 2.8%, the calculation would look like this: This muni would give you the same effective return as taxable security that pays about 3.68%. If you figure in state and local taxes, it could push your taxable equivalent return even higher. This calculation lets you know whether a municipal bond is a smart investment compared to a given stock. In the long term, stocks outperform bonds, but that doesn’t mean your portfolio should contain only stocks. Bonds provide a level of diversification that can cushion your assets, and your future income, during changes in the market. If you’re looking for relatively secure income at a reasonable return, municipal bonds are worth a look for their tax benefits. Depending on your goals, you may find a place for them in your portfolio as part of a diversification strategy.