If you play your cards right in investing, you just might make a fortune. There's only one problem: Unless you're investing in a qualified retirement account, like an IRA or 401(k), you'll lose a portion of your earnings to the IRS. Not only that, but if you make a lot of money from your investments, you might land in a higher tax bracket, which means you'll pay more taxes on your highest dollars of earnings.

That's why it pays to consider tax-free investments for your portfolio in addition to those that are taxable. The more money you keep away from the IRS, the more you'll have available to reinvest and grow your wealth.

Crunching some tax numbers

IMAGE SOURCE: GETTY IMAGES.

Taxable investments

Whenever you make money, the IRS is bound to want its share. And while many people choose investments that are taxable, you should know that in most cases, you will lose a portion of your earnings to the IRS.

The extent to which you're taxed on your investments will depend on how long you held them before selling at a profit. As long as you hold your investments for a minimum of a year and a day, your earnings will be considered a long-term gain. And that's a good thing, because long-term capital gains are taxed more favorably than short-term gains, which apply to investments held for a year or less.

Whereas short-term capital gains are taxed the same way as your ordinary income, long-term capital gains are subject to a maximum tax of 20%, and that rate only applies to the country's wealthiest. Most taxpayers face a 15% tax on long-term capital gains, and lower earners pay no taxes on long-term gains at all.

But even if you limit your taxes by holding investments long enough to avoid short-term gains, you'll still, in most cases, lose some of your earnings to taxes. If you're in a high tax bracket or are worried that your gains might bump you up into a higher bracket, then it pays to explore your tax-free investment options.

Tax-free investments

The beauty of tax-free investments is that they allow you to keep all of your earnings for yourself. Just as importantly, if you're not taxed on your earnings, you can avoid getting pushed into a higher bracket and losing more money that way.

Those interested in tax-free investments should look at municipal bonds, which are debt securities issued by cities, states, and localities, as opposed to corporations. Municipal bond interest is always tax-exempt at the federal level, and if you buy bonds issued by your home state, you'll avoid state and local taxes as well.

That said, it's only municipal bond interest payments that are tax-free. If you buy municipal bonds and then sell them later on for a price that's higher than what you initially paid, you will be subject to capital gains taxes. Whether those taxes come in the long-term or short-term variety will depend on how long you held your bonds before selling.

Another thing to remember about municipal bonds is that although their interest is tax-free, they tend to offer lower yields than comparably rated corporate bonds, whose interest is taxable. You may therefore need to crunch some numbers to see whether it makes sense to choose lower interest payments that are tax-free or higher payments that are taxable.

Which investments are right for you?

The decision to pursue taxable versus tax-free investments will often boil down to your personal tax situation. The higher your marginal tax bracket, the more you stand to gain by avoiding investment taxes.

If you're stuck between two investments choices where one is taxable and the other isn't, you can use the following calculator to compare the two:

 

* Calculator is for estimation purposes only, and is not financial planning or advice. As with any tool, it is only as accurate as the assumptions it makes and the data it has, and should not be relied on as a substitute for a financial advisor or a tax professional.

Though taxes are typically considered an unavoidable part of life, there is such a thing as a tax-free investment. And if you play your cards right, you might come away richer at the end of the day by keeping more of your hard-earned money for yourself.