NEW YORK ( TheStreet) -- In order to do an apples-to-apples comparison between the yield on a municipal bond and a taxable bond, you have to calculate either the taxable-equivalent yield of the muni bond or the after-tax yield of the taxable bond.

Unfortunately, the instructions can't be boiled down to two simple equations because not all munis are totally tax-free (some are subject to state income taxes) and not all taxable bonds are totally taxable (Treasury bond, note and bill interest are exempt from state income taxes).

However, there are a finite number of scenarios you might encounter. So let's run through them. In all examples, 31% represents the marginal federal tax rate and 6% represents the state marginal tax rate. When you do these calculations for yourself, use your own rates.

The examples assume that your state taxes the interest on muni bonds issued outside your state. Most states do, but not all do (Indiana doesn't). Some states (Texas, Washington) don't even have an income tax.

#### Calculating Taxable-Equivalent Yields

If your state does not levy an income tax, you're in luck. To calculate the taxable-equivalent yield of any muni bond, divide its yield by 1 minus your marginal federal tax rate.

Yield / (1 - 31%)

If your state levies an income tax, the same equation can be used to calculate the Treasury-equivalent yield of a muni bond issued in your state or the fully taxable-equivalent yield of a muni bond issued outside your state.

How to calculate the fully taxable-equivalent yield of a muni bond issued in your state depends on whether you deduct your state tax payment on your federal return.

If you do not deduct, divide the muni yield by 1 minus your federal rate minus your state rate.

Yield / (1 - 31% - 6%)

Yield / (1 - 31% - (6% x (1 - 31%))

How to calculate the Treasury-equivalent yield of a muni bond issued outside your state also depends on whether you deduct your state tax payment on your federal return. But first you need to calculate the after-tax yield of the muni by multiplying it by 1 minus your state tax rate.

If you don't deduct your state payment the equation is

(muni yield x (1 - 6%)) / (1 - 31%)

If you deduct it becomes

(muni yield x (1 - (6% * (1 - 31%)) / (1 - 31%)

#### Calculating After-Tax Yields

The after-tax yield on a Treasury is obtained by multiplying its yield by 1 minus your federal tax rate.

Yield x (1 - 31%)

The after-tax yield on a fully taxable bond depends on whether you take that state income tax deduction.

If you do not take the deduction, multiply the yield by 1 minus your federal rate minus your state rate.

Yield x (1 - 31% - 6%)

Yield x (1 - 31% - (6% x (1 - 31%))

RELATED STORIES:

This article was written by Beth Stanton, a staff member of TheStreet.