If you sell a tax-free bond, or shares in a tax-free bond fund, for more than your cost, you must pay federal income tax on the capital gain. If you buy a bond for $10,000 and sell if for $10,500 the $500 gain is taxable. However, if, instead, you sell the bond for $9,500 you have a deductible $500 capital loss. Any “accrued interest” that is part of the purchase or sale price of the bond is not included in determining the gain or loss when the bond is sold. You must also pay federal income tax on any "capital gain distributions" from a tax-free mutual bond fund.
In addition, tax-free income from municipal bonds and municipal bond funds must be included in the calculation of the taxable portion of Social Security and Railroad Retirement benefits. In certain situations, each $1.00 in tax-free bond interest can result in an additional 85 cents of taxable income!
And finally, interest from certain “private activity” municipal bonds is considered a “tax-preference” for purposes of calculating the dreaded Alternative Minimum Tax (AMT). If you are a victim of the AMT the interest from these bonds is taxed at a rate of 26% or 28%. The amount of "private activity interest" should be reported separately on the Form 1099-INT.