Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Money is not a client of any investment adviser featured on this page. The information provided on this page is for educational purposes only and is not intended as investment advice. Money does not offer advisory services.

Municipal bonds are on a tear. On Monday The Wall Street Journal noted that the normally staid $3.7 trillion sector has returned 8.3% so far this year, outperforming the Dow Jones Industrial Average and highly rated corporate bonds. Readers of Money's print edition shouldn't be surprised. Our April issue argued these bonds could "make a bid for comeback investment of the year." If munis are just getting your attention now, here are four things you need to know:

Munis benefit some investors more than others

Munis' interest payments are exempt from federal and sometimes state and local income tax. That means, all other things being equal, those who pay higher tax rates enjoy a bigger benefit. Just how good a deal is it? Because municipal bond buyers are well aware of the tax perks, muni bonds typically yield less than Treasuriess. So to find out if munis make sense for you, you need to look at the difference between these two yields and compare with your tax rate.

The question can also be complicated factors like where you live and whether you are subject to the alternative minimum tax or the new Medicare tax on investment income.

But there is a basic rule of thumb. Start by subtracting your tax bracket from 1. So if you are in the 33% bracket you are left with 0.67. Then divide the municipal bond's tax-free yield by the resulting number. Finally compare the result to the yield on a taxable investment. Right now the 10-year Treasury yields about 2.3%. Top-rated muni bonds with similar 10-year durations are yielding 2.1%. The upshot: A muni investor in the 33% tax bracket could grab an after-tax yield of 3.1%. For an investor in the 25% bracket, the after tax yield falls to 2.8%.

Munis aren't risk free

Although munis may offer an after-tax yield advantage, it comes at a cost. While Treasuries issued by the Federal government are considered iron-clad, municipal bonds' credit risk can range from triple-A to junk, not unlike bonds issued by companies. While you can certainly buy bonds backed by, say, the State of New York or California, many municipal bonds are issued by less august entities -- a particular city or school district. Still others may be backed by a particular stream of revenues -- like the tolls collected on a particular road. In all there are more than 15,000 issuers, according to Moody's. Even counting small issuers, municipal defaults are rare. But political impasses -- like the 2008 California budget deadlock -- can give the markets jitters, driving down prices. Sometimes, as the news out of Detroit or Puerto Rico show, the problems really are serious.

Where you live has a lot to do with the fund you should buy.

Municipal bonds may carry state and local tax perks. For instance, income from municipal bonds issued by a particular state is typically exempt from state income taxes for residents of that state. In other words, New Yorkers who own New York bonds get a state tax break on top of their federal income tax benefits. That's why there's a proliferation of municipal bond mutual funds targeting individual states, especially populous and high-tax ones like New York, California, and New Jersey.

There are some wrinkles that may surprise you, though: Bonds issued by territories like Puerto Rico are exempt from state taxes everywhere. That's helped make them far more popular than they might otherwise be. (They may even turn up in funds labelled "New York.") So Puerto Rico's fiscal problems have had a real impact on individual investors on the U.S. mainland.

If you're just buying now, the deals are less attractive

Of course, while the tax benefits of municipal bonds can seem attractive, taxes should never be your only consideration for an investment. You also have to judge whether the price you're getting will turn out to be a bargain, and the yields the bonds are offering now are looking a bit thin. (Remember, as bond prices rise, yields fall.) Muni bonds had a rough 2013, declining about 2.6% at a time when Detroit's fiscal problems were continually making headlines. But munis haven't just snapped back. They've put together their longest string of monthly gains in two decades, according to the Journal. Such a sharp rally can only mean that investors' return prospects have gotten a lot less rosy.

"It’s difficult to find real value in the muni market these days, but if you already own munis, you should stick with what you own because it’s hard to replace that income,” Jim Kochan, a senior investment strategist at Wells Fargo Advantage Funds recently told investment bible Barron's. “Whenever we’ve been at these yields in the past, it’s never been a good time to buy, because the market usually corrects."