Image: Phillip Ingham, Flickr.

This article was updated on June 9, 2016. Here is information on 2016 long-term capital gains tax rates.

Long-term capital gains result from selling a winning investment that you've held for longer than a year. To encourage people to invest for the long haul rather than trading in and out of the market, the tax rates on long-term capital gains are lower than they are for investments you hold for a year or less. Below, you'll find out what the long-term capital gains tax rates were for 2015 and a couple ways you can cushion the blow of this much-debated tax in future years.

How to figure out your long-term capital gains
The first step in calculating the tax from selling an investment is figuring out how much you earned in capital gains. In general, this is pretty simple: take what you paid for the investment -- also known as your cost basis -- and then subtract that from the proceeds you received when you sold it. If the number is positive, then you have a capital gain; if it's negative, then you have a capital loss.

Occasionally, figuring your capital gain is more complicated. Sometimes, a company will pay money to you as a return of capital, which doesn't get taxed as a dividend or other type of income but which does change your cost basis. That has an impact on how much in gains you realize when you do sell. Moreover, different rules apply if you receive an investment as a gift or as an inheritance. The IRS has more details on cost basis rules and more complex situations at its website here.

Calculating the tax
Once you know the amount of the gain, you need to know the tax rates that apply. Three different rates exist on long-term capital gains, and which one is right for you depends on what tax bracket you're in:

• If you're in the 10% or 15% tax bracket for ordinary income, then your long-term capital gains rate is 0%.
• If you're in the 25%, 28%, 33%, or 35% tax bracket, then your long-term capital gains rate is 15%.
• If you're in the 39.6% tax bracket, then your long-term capital gains rate is 20%.

Those rates apply to federal taxes, but if your state has an income tax, you'll probably have to add on an additional amount there. Some states, such as California, make no distinction between long-term capital gains and other types of income in imposing taxes. Others, such as Massachusetts, have much lower rates for long-term capital gains than for short-term gains. Your particular tax rate will depend on your income level and the specific brackets that your state imposes. For a good overview, check out this article on state capital gains taxes.

3 other things to keep in mind
In addition to the above, there are a few things you should remember about long-term capital gains and the taxes you have to pay on them.

First, for high-income taxpayers, long-term capital gains do count as qualifying income for purposes of the 3.8% surtax on net investment income. This means that for single taxpayers making more than \$200,000 and joint filers earning more than \$250,000, the effective long-term capital gains tax rate is 3.8 percentage points higher than otherwise indicated.

Second, be aware that you only have to pay tax on the net amount of capital gains you have. So if you sell one stock at a gain and another at a loss, those two figures can balance each other out, and you'll only pay tax on the total amount of overall profit from the combination of both positions.

Finally, if you hold your assets until your death, then your heirs get an automatic step-up in cost basis. That effectively eliminates any pent-up capital gains tax liability and gives your heirs a fresh start. They'll pay taxes on any gains after your death, but for long-held winning stocks, the step-up at death is a huge tax break.

Tax planning can seem complex, but in some cases, it is. But dealing with capital gains doesn't have to be hard. Keep these simple tactics in mind, and you'll go a long way toward reducing your capital gains tax bill both for the 2015 tax year and for future years as well.

Dan Caplinger has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. 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.