The tax-equivalent yield (TEY) formula — the workhorse for the muni-vs-taxable decision.
TEY = muni_yield / (1 − t_marginal)
Where t_marginal is the marginal tax rate on the comparable taxable bond's interest. The intuition: if your taxable bond's interest is taxed at 32% federal, a muni paying 3.5% is equivalent (after-tax) to a taxable bond paying 3.5% / (1 − 0.32) = 5.15%. Any taxable yield below 5.15% loses to the muni; any taxable yield above wins.
In-state muni (federal + state tax-free). Compare against a corporate or out-of-state bond that is fully taxable. Marginal rate = federal + state + NIIT.
TEY_in_state = muni_yield / (1 − (fed + state + NIIT))
Out-of-state muni (federal tax-free only). The state taxes the interest. If comparing against a Treasury (also state-exempt), the marginal rate is federal + NIIT. If comparing against a corporate, the state offset partly cancels.
TEY_out_state_vs_corp = (muni_yield × (1 − state)) / (1 − (fed + state + NIIT))
TEY_out_state_vs_treasury = (muni_yield × (1 − state)) / (1 − (fed + NIIT))
NIIT (Net Investment Income Tax) — the 3.8% surcharge that applies to taxable investment income above $200K (single) / $250K (MFJ) MAGI. NIIT does NOT apply to municipal-bond interest. That means high-earner households see an extra 380bps relative benefit from munis — usually enough to flip the muni-vs-Treasury decision toward munis at modest yield spreads.
AMT & private-activity bonds. Interest on most munis is fully tax-exempt at the federal level. But interest on private-activity bonds (issued for non-governmental purposes — airport facilities, stadium financing, hospital construction) is an AMT preference item. If you are subject to AMT, you owe AMT on that interest at 26% or 28%. Bonds carrying AMT exposure are typically labeled "AMT" in the offering doc; they trade at a yield premium of 20-50 bps to compensate.
The breakeven formula — rearranges TEY.
Breakeven_taxable_yield = muni_yield / (1 − t_marginal)
i.e., breakeven = TEY by definition.
Caveat — credit risk. The TEY framework is yield-only. It does not adjust for credit risk. General-obligation munis are typically AA/AAA; revenue bonds vary widely. A 3.5% Puerto Rico GO is not a "3.5% muni" in any meaningful comparison sense. Match credit quality before comparing yield.