While interest on municipal bonds is tax free for federal income tax purposes, gain or loss on the sale of the bonds must be reported. The loss is treated as a capital loss, which is deductible within capital loss rules. That is, the loss can fully offset gains. Then, up to $3,000 of losses can be used to offset ordinary income ($1,500 for those who are married filing separately). Any excess capital loss can be carried forward to the following year.
Rules that limit the deduction of losses from passive activities to income from other passive activities. Passive activities include investment rental operations or businesses in which you do not materially participate.