Do Municipal Bonds Help You Avoid the 3.8% NIIT? (w/Examples) + FAQs

This article reflects federal rules and state rules as of June 2026 and covers tax year 2025 (returns filed in 2026), with 2026 figures noted where they differ. Tax law changes — confirm current figures before you file.

Quick Answer

Yes. For tax year 2025, the interest you earn on tax-exempt municipal bonds is excluded from net investment income, so it is not hit by the 3.8% Net Investment Income Tax (NIIT). It also stays out of your modified adjusted gross income (MAGI), which can help keep you under the NIIT threshold.

Municipal bonds work on the NIIT in two ways at once, and most people only know about one. First, the tax-exempt interest itself is not counted as net investment income, so the 3.8% surtax never touches it. Second, because that interest is excluded from your MAGI, it does not push you closer to the $200,000 or $250,000 line where the tax kicks in. A taxable bond paying the same coupon would do the opposite on both counts.

But there is a catch that trips up high earners every filing season: a capital gain from selling a municipal bond is fully taxable as net investment income, even though the interest was not. The tax-free label covers the interest, not the profit on the sale. Knowing the difference is the line between a clean strategy and a surprise bill on Form 8960.

Here is what you will learn:

  • 💸 How muni interest dodges the 3.8% NIIT on two fronts — both the tax itself and the MAGI threshold.
  • 📉 Why selling a muni at a profit can still trigger NIIT, with the exact math.
  • 🧮 A full taxable-equivalent-yield example comparing a muni to a corporate bond after the NIIT.
  • 🗺️ How states treat muni interest differently from the IRS — and why no state charges the NIIT at all.
  • ⚠️ The private-activity-bond trap that swaps one tax for another (the AMT).

What the NIIT Is and Who Pays It

The Net Investment Income Tax is a flat 3.8% surtax on investment income, created to help fund Medicare and in effect since 2013. The IRS explains in Topic 559 that for an individual, the tax applies to the lesser of two numbers: your net investment income, or the amount your MAGI exceeds a fixed threshold. You report and calculate it on Form 8960.

For tax year 2025, the MAGI thresholds are $200,000 for single or head of household, $250,000 for married filing jointly or a qualifying surviving spouse, and $125,000 for married filing separately. Here is the part that surprises people: these thresholds are not indexed for inflation. They have been frozen at these exact figures since the tax began in 2013, which means each year of raises and growth quietly pulls more middle-upper earners into the tax. The consequence is real money — a couple just $50,000 over the line with $50,000 of net investment income owes $1,900 they would not have owed a decade ago at the same inflation-adjusted income.

A common misconception is that crossing the threshold taxes your whole income at 3.8%. It does not. The tax hits only the smaller of your net investment income or your excess MAGI. The thing you should do about this: before you file, run both numbers, because the strategy that helps depends on which one is smaller for you.

Net investment income, per the IRS, includes interest, dividends, capital gains, rental and royalty income, non-qualified annuities, and income from passive businesses. It does not include wages, Social Security, active business income, or — critically here — tax-exempt municipal bond interest.

How Municipal Bonds Beat the NIIT

Municipal bonds are debt issued by states, cities, counties, and their agencies to fund things like roads, schools, and water systems. In exchange for lending them money, you collect interest that is generally exempt from federal income tax. That same federal exemption is what lets muni interest sidestep the NIIT.

Reason 1: Muni Interest Is Not Net Investment Income

Net investment income is built from taxable investment income. Because qualifying municipal bond interest is tax-exempt at the federal level, it never enters the net investment income pool in the first place. Stifel confirms that interest earned on municipal bonds is exempt from the NIIT, and a 2026 tax planning guide from Kahn, Litwin agrees that the interest is “essentially shielded from the 3.8% tax.”

The consequence of getting this wrong is overpaying. If you mistakenly treat muni interest as taxable investment income on Form 8960, you inflate your net investment income and hand the IRS 3.8% it was never owed. What you should do: report tax-exempt interest on Form 1040 line 2a for tracking, but keep it out of the Form 8960 investment-income total.

Reason 2: Muni Interest Stays Out of Your MAGI

This is the half most investors miss. Because the surtax is charged on the lesser of net investment income or excess MAGI, lowering your MAGI can shrink — or erase — the tax even on your other investments. Kahn, Litwin notes muni interest “isn’t counted when calculating MAGI, so investing in them can help you stay below the NIIT threshold.”

The misconception here is that muni interest is invisible. It is not — it is reported on line 2a and counts for things like Social Security taxation and IRMAA Medicare premiums. The point for NIIT is narrower: it does not raise the MAGI figure used for the surtax. What you should do: if you are near the threshold, swapping a taxable bond for a comparable muni can lower your excess MAGI and the whole surtax with it.

The Capital Gains Trap Most Investors Miss

Here is the rule that costs people money: the tax-free shield covers muni interest, not the gain when you sell the bond. If you buy a muni and later sell it for more than you paid, that profit is a capital gain — and capital gains are squarely inside net investment income. The same is true for capital gain distributions from a muni bond fund.

The consequence is a 3.8% bill on a gain you thought was protected. Suppose you sell appreciated munis for a $40,000 profit; if you are over the NIIT threshold, that gain can carry up to $1,520 of NIIT, on top of regular capital gains tax. A related trap is the de minimis rule: when you buy a muni at a discount big enough, Fidelity explains part of your gain is taxed as ordinary income rather than capital gain, which changes the math again.

The misconception is “munis are tax-free, period.” Only the interest is. What you should do: hold munis you do not plan to sell, harvest losses to offset muni gains, and never assume a sale is exempt just because the coupon was.

Which Situation Applies to You?

The right move depends on where you sit. Find your case below.

  • Your MAGI is below the threshold ($200k single / $250k MFJ for 2025). You owe no NIIT at all yet. Munis still help you stay below the line as your income grows. Read the MAGI section above.
  • You are over the threshold and your net investment income is the smaller number. Reducing investment income directly cuts the tax. Swapping taxable bonds for munis is your strongest lever. Read the worked example below.
  • You are over the threshold and your excess MAGI is the smaller number. Lowering MAGI helps most; muni interest does double duty here. Read Reason 2 above.
  • You hold private activity bonds or AMT-bond funds. You may dodge the NIIT but trigger the AMT instead. Read the AMT section below.
  • You plan to sell appreciated munis this year. Your gain is taxable net investment income. Read the capital gains trap above.

Worked Example: Muni vs. Corporate Bond After the NIIT

The real decision is not “is it tax-free” but “does the after-tax yield beat a taxable bond.” That is what the taxable-equivalent yield (TEY) measures, and for high earners the NIIT belongs in the formula. Bankrate gives the formula:

[ \text{Taxable-equivalent yield} = \frac{\text{Muni yield}}{1 – \text{combined tax rate}} ]

Meet David and Maria Chen, married filing jointly, with a 2025 MAGI of $400,000. They are in the 35% federal bracket, they live in California with a roughly 9.3% state rate, and because their MAGI tops $250,000 they also face the 3.8% NIIT on taxable investment income. They are choosing between an in-state California muni yielding 4.0% and a corporate bond yielding 4.81% — close to the Q4 2025 market where the muni index yielded about 4% and investment-grade corporates about 4.81%.

Their combined tax rate on the taxable bond is 35% federal + 9.3% California + 3.8% NIIT = 48.1%. Now run the TEY on the 4.0% in-state muni, whose interest escapes all three:

[ \text{TEY} = \frac{0.040}{1 – 0.481} = \frac{0.040}{0.519} = 7.71\% ]

The muni’s 4.0% tax-free yield is worth the same as a 7.71% taxable yield to the Chens. Put another way, look at what they actually keep:

  • Corporate bond, 4.81%: after 35% + 9.3% + 3.8% = 48.1% tax, they net about 4.81% × (1 − 0.481) = 2.50%.
  • California muni, 4.0%: federal, state, and NIIT-free, they net the full 4.0%.

The muni wins by 1.50 percentage points of after-tax yield, and on a $500,000 bond allocation that is about $7,500 more in their pocket every year. The NIIT alone accounts for 4.81% × 3.8% = 0.18 points of the corporate bond’s drag — small per bond, but it is the piece many calculators leave out.

Three Common Scenarios

These show how the same bonds land differently depending on what you do.

Scenario 1 — Holding munis for interest

What You Do What Happens on the NIIT
Hold tax-exempt municipal bonds and collect coupon interest while MAGI is $400,000 Interest is excluded from net investment income and from NIIT MAGI; the 3.8% surtax never touches it

Scenario 2 — Selling a muni at a profit

What You Do What Happens on the NIIT
Sell a muni bought at $98,000 for $102,000, a $4,000 gain, while over the threshold The $4,000 capital gain is net investment income and can carry up to $152 of NIIT, plus regular capital gains tax

Scenario 3 — Holding private activity bonds

What You Do What Happens on Your Taxes
Hold a high-yield muni fund where part of the interest comes from private activity bonds NIIT still does not apply, but that interest is added back for the AMT and can create a separate tax bill

Named Examples

Sarah, single, $230,000 MAGI. Sarah is $30,000 over the 2025 single threshold and has $20,000 of net investment income from a taxable bond fund. Her NIIT is 3.8% × $20,000 (the smaller number) = $760. She swaps the fund for a muni fund of similar yield. Her muni interest is now excluded, her net investment income drops toward $0, and her NIIT falls to about $0 — a clean $760 saved.

The Okafor family, MFJ, $258,000 MAGI. They are only $8,000 over the $250,000 line. Because the tax hits the lesser of NII or excess MAGI, their NIIT is capped by that $8,000 excess. Moving $10,000 of taxable interest into munis pulls their MAGI under $250,000, and the entire surtax disappears — not just the part on the bond.

Robert, retiree, $300,000 MAGI. Robert sells appreciated munis for a $50,000 gain to fund a home purchase. He assumed it was all tax-free. The interest was, but the $50,000 gain is net investment income, so he owes 3.8% × $50,000 = $1,900 of NIIT plus long-term capital gains tax. A loss-harvesting trade earlier in the year could have softened it.

The Private Activity Bond and AMT Trap

Some munis are private activity bonds (PABs) — issued to fund things like stadiums or private hospitals. Their interest is still tax-exempt for regular federal tax and still escapes the NIIT, but there is a swap: the interest is added back when you compute the Alternative Minimum Tax (AMT) on Form 6251, line 2g.

The consequence is that a high earner can avoid the 3.8% NIIT only to owe AMT instead. For tax year 2025, the AMT exemption is $88,100 single and $137,000 MFJ, with rates of 26% and 28%. PAB interest shows up in Box 13 of your 1099-DIV. The misconception is that all munis are AMT-safe; many funds hold some PABs — Vanguard and Lord Abbett publish the AMT percentages each year. What you should do: if you are AMT-exposed, choose “AMT-free” muni funds.

Federal vs. State Treatment

Start with the federal rule, then check your state, because they do not match.

Federal Rule (2025) State Rule
Muni interest is tax-exempt and excluded from the 3.8% NIIT No state charges the NIIT — it is a federal-only tax, so states never apply 3.8% to investment income
All qualifying muni interest is federally tax-free regardless of issuing state States usually tax out-of-state muni interest but exempt in-state bonds, per TaxGPT

The key point: the NIIT is purely federal, so worrying about state NIIT is unnecessary — it does not exist. What does vary by state is whether your muni interest is taxed at the state level. A California resident holding California bonds pays no California tax; the same resident holding Texas bonds usually owes California tax on that interest. States with no income tax, like Texas and Florida, do not tax any muni interest, so the in-state/out-of-state distinction does not matter there.

Mistakes to Avoid

  • Reporting muni interest as taxable on Form 8960. This inflates your net investment income and makes you overpay the 3.8% tax.
  • Assuming muni capital gains are tax-free. Gains on a sale are net investment income and can trigger NIIT plus capital gains tax.
  • Thinking crossing the threshold taxes all income. The tax hits only the lesser of NII or excess MAGI, so you can overestimate your bill and panic-sell.
  • Ignoring the de minimis rule. Buying deeply discounted munis can turn part of your gain into ordinary income, raising your tax.
  • Holding PAB-heavy funds while AMT-exposed. You dodge the NIIT but get hit with the AMT instead — no net win.
  • Comparing muni yields to taxable yields head-to-head. Without a taxable-equivalent-yield calc that includes the 3.8% NIIT, you will undervalue the muni.
  • Forgetting muni interest still counts for IRMAA and Social Security. It is NIIT- and income-tax-free but can still raise Medicare premiums and tax your benefits.

Do’s and Don’ts

  • Do run the taxable-equivalent yield with all three taxes (federal, state, NIIT) — it reveals the muni’s true value to high earners.
  • Do favor in-state munis if your state taxes investment income — you escape state tax too.
  • Do harvest losses to offset muni capital gains — gains are NIIT-eligible and worth offsetting.
  • Do check Box 13 of your 1099-DIV for PAB interest — it warns you of AMT exposure.
  • Do report tax-exempt interest on line 2a even though it is not taxed — the IRS still wants it tracked.
  • Don’t treat the sale of a muni as automatically tax-free — only the interest is exempt.
  • Don’t assume your state mirrors federal treatment — out-of-state munis are often state-taxable.
  • Don’t chase yield into PAB funds without checking AMT — the saved NIIT can reappear as AMT.
  • Don’t rely on muni interest to lower IRMAA — for that test it still counts.
  • Don’t skip Form 8960 just because you hold munis — other income may still create a filing duty.

Pros and Cons of Using Munis to Avoid the NIIT

  • Pro: Double NIIT benefit. Muni interest is both excluded from net investment income and from MAGI, hitting the tax from two sides.
  • Pro: Federal tax-free too. You skip ordinary income tax and the 3.8% surtax at once, boosting after-tax yield.
  • Pro: In-state state savings. In-state munis can be free of federal, state, and NIIT all together.
  • Pro: Predictable income. Bonds give steadier cash flow than equities, helpful for retirees managing thresholds.
  • Pro: No state NIIT to worry about. Because the surtax is federal-only, the strategy never faces a state version.
  • Con: Lower headline yield. Munis pay less than taxable bonds, so the benefit only shows after the TEY math.
  • Con: Gains are still taxed. Selling at a profit creates NIIT-eligible capital gain, eroding the “tax-free” idea.
  • Con: AMT risk from PABs. Private activity bonds can swap the NIIT for the AMT.
  • Con: Still counts for IRMAA. Muni interest can raise Medicare premiums even while dodging the NIIT.
  • Con: Interest-rate risk. Long munis can lose market value if rates rise, creating losses if you must sell.

What to Do Next

  1. Pull your last Form 1040 and find your MAGI and filing status; compare to the 2025 threshold for your status.
  2. If you are over, fill out Form 8960 to see whether your net investment income or your excess MAGI is the smaller, taxed number.
  3. List your taxable interest sources and run the taxable-equivalent yield against comparable munis, including the 3.8% NIIT in your combined rate.
  4. Check Box 13 of each 1099-DIV for private activity bond interest and confirm whether you are AMT-exposed before buying more.
  5. Gather brokerage statements showing muni purchase prices so you can plan around the capital gains and de minimis rules before selling.
  6. If your situation involves large muni sales, AMT exposure, an estate, or a trust, call a CPA or tax attorney — this is educational information, not advice for your specific facts, and a pro can model the exact tax. For a trust, note the 2025 NIIT threshold is just $15,650 of AGI, far lower than for individuals.

FAQs

Are municipal bonds exempt from the 3.8% Net Investment Income Tax?

Yes. For tax year 2025, federally tax-exempt municipal bond interest is not net investment income, so the 3.8% NIIT never applies to it. It is also excluded from the MAGI used to test the threshold.

Does municipal bond interest count toward my NIIT MAGI?

No. Tax-exempt muni interest does not raise the MAGI figure used to test the $200,000 or $250,000 NIIT threshold for 2025. It is reported on Form 1040 line 2a but stays out of the surtax math.

Do I owe NIIT when I sell a municipal bond for a profit?

Yes, if you are over the threshold. A capital gain on selling a muni is net investment income, so the 3.8% surtax can apply to the gain — even though the interest was tax-free.

What is the NIIT threshold for 2025?

$200,000 single, $250,000 married filing jointly, $125,000 married filing separately. These IRS thresholds are not adjusted for inflation and have stayed the same since 2013.

Does any state charge a version of the NIIT?

No. The NIIT is a federal-only surtax. No state imposes its own 3.8% net investment income tax, though states may separately tax out-of-state muni interest.

Do municipal bonds avoid the NIIT if I hold them in a fund?

Yes, for the interest. A muni fund’s tax-exempt interest dividends are excluded from net investment income. But capital gain distributions from the fund are NII and can be taxed.

Can private activity bonds still trigger a tax even though they skip the NIIT?

Yes. Private activity bond interest is exempt from the NIIT but is added back for the AMT, so high earners may owe AMT instead.

How do I calculate the taxable-equivalent yield with the NIIT?

Divide the muni yield by (1 minus your combined rate). Add federal, state, and the 3.8% NIIT into the combined rate. A 4% muni at a 48.1% combined rate equals a 7.71% taxable yield.

Which form reports the NIIT?

Form 8960. You attach Form 8960 to your Form 1040 to calculate and report the 3.8% Net Investment Income Tax for the year.

Does muni interest reduce my Medicare IRMAA or Social Security taxation?

No. Muni interest is free of income tax and the NIIT, but it still counts toward the MAGI tests for IRMAA premiums and the taxation of Social Security benefits.

Are out-of-state municipal bonds taxed differently?

Yes. Per TaxGPT, in-state muni interest is usually state-tax-free, while out-of-state muni interest is generally taxable by your home state — though neither is hit by the federal NIIT.

Do trusts and estates face the NIIT on muni bonds?

Yes, but only on taxable income. Tax-exempt muni interest is still excluded. For 2025, a trust owes NIIT once undistributed NII exists and AGI tops $15,650 — a far lower threshold than for individuals.