With the losses most people have seen in their portfolios over the past couple of years, you're probably still smarting from the financial hit you've taken, despite the recent rally in stocks. The last thing you need right now is to add insult to injury by having to pay the IRS one cent more than you absolutely have to.

Be smart about taxes
As you build experience as an investor, you'll realize just how much taxes are an essential part of investing. In particular, they can have a big impact on how you invest and which investments you pick.

For example, one reason why short-term trading puts investors at a disadvantage is that any gains you generate from rapid buying and selling get taxed at the same higher rates as ordinary income. On the other hand, if you hold onto an investment for more than a year, then you'll typically convert any profits to long-term capital gains, which currently receive a preferential tax rate.

Similarly, different types of investments get treated differently. Let's talk about some investments that get preferential treatment from the tax man.

1. Municipal bonds
Ordinarily, income from bonds gets taxed as regular income. But one type of bond breaks that rule, giving investors the chance to receive tax-free interest.

Municipal bonds are issued by state and local governments, usually to finance their general operations or a specific public project. Because federal tax law makes the interest on these bonds exempt from tax, governments are able to obtain financing at lower interest rates than they'd otherwise have to pay if they issued taxable bonds. That's because investors require less interest if they don't have to worry about losing part of it to taxation.

In addition to being federally tax-exempt, municipal bonds are also free of state tax to residents of the home state of the issuing government agency. Right now, municipal bonds offer attractive rates compared to comparable Treasury bonds, perhaps due to economic uncertainty and fiscal challenges that state and local governments face right now.

2. Stocks held for the long run
One of the least recognized but most valuable tax breaks you have as an investor comes from the fact that you never have to pay taxes on a stock's gains until you actually sell the stock. Year in and year out, your stocks may rise in value. But there's no tax bill for those paper gains.

That gives you total control over when and how much you pay in taxes. For instance, investors who bought shares of Google (NASDAQ:GOOG) five years ago have seen their shares triple in value, with a gain of almost $380 per share. If you sold today, you'd pay tax on that $380 per share -- at a preferential maximum rate of 15%. But if you don't sell, then you get to defer that tax until you do.

Moreover, if you hold those shares until you die and pass them on to your heirs, then the shares will get what's called a basis step-up, meaning that no one will pay tax on that gain. That's one of the biggest tax-free opportunities out there -- although someone has to die to take advantage of it.

3. Dividend-paying investments -- mostly
Another tax break goes to stocks that pay dividends. A maximum 15% rate currently applies to most dividend stocks as well. That makes dividend yields more attractive on an after-tax basis than a bond paying the same rate:

Stock

Current Dividend Yield

Tax-Equivalent Yield For Investor in 35% Bracket

Automatic Data Processing (NASDAQ:ADP)

3.1%

4.1%

Coca-Cola (NYSE:KO)

3%

3.9%

Consolidated Edison (NYSE:ED)

5.7%

7.5%

Diageo (NYSE:DEO)

4.4%

5.8%

Merck (NYSE:MRK)

4.7%

6.1%

Altria (NYSE:MO)

7.3%

9.5%

Source: Yahoo! Finance. Tax-equivalent yield assumes 15% maximum rate on dividends and 35% rate on ordinary income apply.

What the table means is that in order to find an investment that would pay as much after taxes as Altria, for instance, you'd have to find a bond paying 9.5%. That's a tall order in today's low-interest rate environment.

Unfortunately, some investments don't qualify for the lower rate on dividends. Income on REITs like Equity Residential and Public Storage, for instance, is taxed at ordinary rates.

You can't always avoid taxes entirely. But by being tax-smart about your investments, you can at least cut your tax bill somewhat -- and every penny that you keep means more money in your pocket.