The capital gains tax can be quite burdensome for investors, and it can be devastating to long-term investment performance.

Taxes Sign

Source: 401kcalculator.org via Flickr.

For example, if you invested in some stocks 30 years ago and haven't sold any of them along the way, capital gains tax will still likely eat up 15% of your investment gains when you finally decide to sell, unless you're in one of the lowest tax brackets. And the effect is even worse if your portfolio has high turnover -- i.e., if you sell some stocks every few years, or if you hold investments for less than one year.

Here are three ways to reduce or eliminate capital gains taxes in your portfolio.

1. Buy and hold
One of the best strategies to reduce how much capital gains tax you pay is only to buy stocks that you plan to hold for at least a year. That's because short-term and long-term capital gains are taxed very differently.

Specifically, short-term capital gains tax applies to any investments that you hold for a year or less. Any gains on investments of this type are taxed at your marginal tax rate (i.e., your tax bracket).

However, long-term investments -- which are defined as those held for at least a year and a day -- are taxed at lower rates. The actual long-term capital gains tax rate depends on your ordinary income tax rate and ranges from 0% for the two lowest tax brackets to 20% for the highest.

2014 Short-term vs. Long-term U.S. Capital Gains Tax Rates | Create Infographics

While 20% of your investment gains might sound like a lot to give up if you're in the top tax bracket, it's definitely better than the alternative. If you find yourself sitting on some big investment gains just a few months after buying a stock, you might want to consider holding on to it for a little while. Sure, it's tempting to sell for a quick score, but you could add quite a bit to your gains if you chose to wait.

Let's say you buy $10,000 worth of one stock, and after 10 months, your investment shoots up to $15,000. By holding out for another two months, you could save yourself up to $1,000 in capital gains taxes. Even if the share price pulls back a little, you're still likely to come out ahead.

2. Don't be afraid to cut your losses
As tax time approaches, consider cutting your losses and getting rid of some investments that just aren't going your way. The IRS allows capital losses to offset capital gains for tax purposes. For example, if you sell an investment for a gain of $4,000 and sell another for a $1,000 loss, your net capital gain for the year is reduced to $3,000.

Even if you didn't sell any investments for a profit this year, the IRS allows you to use your capital losses to reduce your other income, up to an annual limit of $3,000. And if your capital losses are more than this amount, you can even carry the remaining amount over to next year's tax return.

So if you bought a stock or fund that has done nothing but lose money for you, consider cutting your losses and using it to your advantage. In a way, it's like the IRS is "subsidizing" your bad investments. Why not take advantage?

3. Consider a Roth IRA
When it comes to retirement investing, the best vehicle is generally an individual retirement account. There are two main types of IRAs: traditional and Roth. The main difference between the two is how your contributions are taxed.

In a traditional IRA, contributions might be tax-deductible, depending on your income and whether or not you can participate in a retirement plan at work. However, once you retire, you have to pay taxes on your withdrawals once you retire.

With a Roth IRA, contributions are not tax-deductible, but qualifying withdrawals are tax-free. And the better your investment performance over time, the more extra money this can leave in your pocket. For example, if you contribute $150,000 to a Roth IRA over a 30-year time period and end up with an account worth $1 million, you won't pay a dime in taxes on any of it, regardless of your income level when you retire.

Smart tax-planning can make a huge difference
Capital gains tax can take a real bite out of your investment returns if you let it. However, as we have seen here, there are a few smart ways to reduce, or even eliminate, capital gains tax on your investments. And reducing taxes by a little bit here and there can really add up over time.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.