Every investor wants their investments to rise in value. But when you sell a winning investment, you typically don't get to keep all your profits. Instead, the IRS steps in with taxes on your capital gains, leaving you with just a portion of the money you made investing.

Taxing your investment profits could be simple, but under the current tax laws, it's anything but. With many different sets of rules, tax rates, and special provisions, it takes some effort to find out exactly how capital gains taxes work. Below, you'll learn everything you should expect on capital gains taxes and how you can cut your tax bill.

What are capital gains?

Capital gains are the profits from an investment when you sell it for more than you paid for it. It's usually fairly easy to figure out whether you have a capital gain, especially with publicly traded investments like stocks or funds. If the price of your stock or fund has gone up since you bought your shares, you'll generally have a capital gain, and if the price has gone down, you'll have a capital loss.

Bar, pie, and line charts showing upward movement.

Image source: Getty Images.

As an example, take a stock that you paid $40 per share to buy 100 shares. Later, when you decide to sell, the stock price has gone up to $50 per share. If you go forward with the sale, then your capital gains would be $10 per share, or $1,000 in total.

What are capital gains taxes?

Capital gains taxes are what the federal government collects when you have capital gains. Some states have their own capital gains taxes as well.

Capital gains taxes don't work exactly the same way some other taxes do. One big benefit for investors is that until you sell your stock or other investment, you won't owe capital gains taxes on the increase in its value. No matter how much the price of a stock goes up, there's no capital gains tax until you sell. By contrast, the interest and dividends that many investments pay typically get taxed right away -- even if you take the money and buy more shares. Because of this feature, capital gains are an area in which taxpayers can use timing to their advantage.

Moreover, capital gains tax rates are often lower than tax rates on wages, investment interest, and other types of income. That has changed over the years, but the current tax laws offer a considerable preference for certain capital gains that encourage investors to make smart investments, providing much-needed capital to businesses.

What types of investments are subject to capital gains taxes?

You can break down investments that are subject to taxes on capital gains into two broad categories. The first includes any investment you make. If your goal in buying an asset is to sell it to another investor at a future date for a higher price, then you'll generally be subject to capital gains tax when you sell.

The second category is residential real estate. Even those who don't intend to invest in real estate and only want a place to live potentially have to pay capital gains on their personal residence if it rises in value. That's offset, however, by a large capital gains tax exemption that lets most homeowners avoid tax on up to $250,000 for single filers and $500,000 for joint filers.

Things are different if you're in the business of selling a certain type of asset. Profits from business activity are typically treated as business income rather than capital gains. So if you're a coin dealer, then profits on the sales of coins you hold in inventory will get taxes as regular business income. However, investors who hold some coins can claim capital gains treatment when they sell. The same is true for real estate developers in comparison to real estate investors.

What tax rates apply to different types of capital gains?

Things get even harder when you need to figure out what tax rate applies to your capital gains. First and foremost, you should measure how long you held the investment. If you own an investment for a year or less, then it's treated as a short-term capital gain. Own it for at least a year plus a day or longer, and it becomes a long-term capital gain.

Taxes on short-term capital gains are easy to figure because they're taxed as if they were ordinary income. You get no preference for a short-term capital gain. To figure out the rate, you'll just need to know what your regular tax bracket is, based on your total income for the year.

For long-term capital gains rates, though, lower rates are available. That's because lawmakers wanted investors to have an incentive to invest for the long run. A year plus a day isn't really a long time for many investors, but it's the rule that lawmakers arbitrarily selected.

Long-term capital gains are usually subject to one of three tax rates: 0%, 15%, or 20%. As the tables below for the 2019 and 2020 tax years show, your overall taxable income determines which of these rates will get charged on your capital gains.

Long-term capital gains taxes for 2019 tax year

Filing Status

0% Rate Applies

15% Rate Applies

20% Rate Applies

Single

Up to $39,375

$39,375 to $434,500

Above $434,500

Married Filing Jointly

Up to $78,750

$78,750 to $488,850

Above $488,850

Head of Household

Up to $52,750

$52,750 to $461,700

Above $461,700

Married Filing Separately

Up to $39,375

$39,375 to $244,425

Above $244,425

Data source: IRS. Rate thresholds are based on taxable income.

Long-term capital gains taxes for 2020 tax year

Filing Status

0% Rate Applies

15% Rate Applies

20% Rate Applies

Single

Up to $40,000

$40,000 to $441,450

Above $441,450

Married Filing Jointly

Up to $80,000

$80,000 to $496,600

Above $496,600

Head of Household

Up to $53,600

$53,600 to $469,050

Above $469,050

Married Filing Separately

Up to $40,000

$40,000 to $248,300

Above $248,300

Data source: IRS. Rate thresholds are based on taxable income.

These tables allow you to draw some useful conclusions:

  • If your income is low, then capital gains can be tax-free up to the top of the 0% rate bracket.
  • You might owe different tax rates on capital gains if you have enough in gains to cross the income levels above. For example, say that you have $41,000 in taxable income in a given year, including $2,000 from long-term capital gains. In that case, the first $1,000 would be subject to the 0% rate, but the other $1,000 would take you above the $40,000 mark, at which the 15% rate would apply.
  • The 0% bracket for long-term capital gains is close to the current 10% and 12% tax brackets for ordinary income, while the 15% rate for gains corresponds somewhat to the 22% to 35% bracket levels. However, the numbers aren't exact, because capital gains got handled differently than ordinary income under the tax law changes that took effect for 2018.

Unfortunately, the tables don't cover all situations. Sales of collectibles, such as art, antiques, jewelry, and precious metals, have a higher 28% maximum rate. If your ordinary income tax rate is lower, then you can pay that lower amount.

Real estate is also more complicated. Those who invest in real estate get to take depreciation deductions that reflect the wear and tear on property as it gets older. Those depreciation deductions give you a tax benefit now, but they also reduce your tax basis in the property. In effect, you're treated as if you had paid less for the property in the beginning than you did. As an example, if you paid $800,000 for a building and you're allowed to claim $40,000 in depreciation, then if you sell, you'll be treated for capital gains purposes as if you'd paid $760,000 for the building.

At the time of sale, you'll be required to recapture the depreciation amount at a 25% tax rate. So using the same example in the last paragraph, if you sold the building for $900,000, total capital gain would be $140,000. Of that, $40,000 would be recapture and taxed at 25%. You'd pay tax of 0%, 15%, or 20% on the remaining $100,000 as shown in the table.

How are capital gains taxes calculated?

The following four-step process can help you calculate your total capital gains taxes:

  • Sort out the investments you've sold into those that have a profit or a loss.
  • Then sort those winning and losing investments into short-term and long-term.
  • In each category, use losses to offset gains and come up with a net gain or loss. Then if you have a gain in one category and a loss in the other, come up with an overall net figure across both short-term and long-term gains and losses.
  • Apply the appropriate tax rate to the result.

First, look at everything you sold during the year and determine whether you made or lost money on your investment. Then, separate short-term and long-term investments. That'll create four separate groups: short-term gains, short-term losses, long-term gains, and long-term losses.

Next, net out the the gains and losses within group. For example, if you had short-term gains of $1,200 and short-term losses of $1,000, then you'd have a net short-term gain of $200. Similarly, if you had total long-term gains of $600 and long-term losses of $700, you'd finish with a net long-term loss of $100.

If one figure is a loss while the other is a gain, then you'll take the further step of coming up with an overall net number. In the example above, the $100 long-term loss is able to offset a portion of the $200 short-term gain, leaving an overall short-term gain of $100. If you have gains in both categories, then you'll need to keep both separate, because the tax rate on each will be different.

The final step is to take whatever gains are remaining and calculate the tax. As a practical matter, you'll end up using a special IRS capital gains worksheet to come up with the actual tax figure that reflects the preferential rate on any long-term capital gains.

How can I reduce my capital gains taxes?

Paying as little as you can on capital gains taxes is important. There are a number of strategies you can use to lower your tax bill.

Timing your sales of winning investments is the best and easiest way to manage your capital gains taxes. Keep in mind that paper gains are not taxed. You'll only pay tax when you cash in those investments, and it's almost always up to you to decide when that happens.

Making sure that you hold onto winning investments long enough to get the lower long-term capital gains tax rate is also a popular strategy. That doesn't mean it always works, as sometimes quick gains you earn soon after buying a stock can disappear by the time you've held it for longer than a year. Nevertheless, if you're close to the one-year mark, then hanging on a little while longer can mean the difference between a big tax bill and a much smaller one.

Many investors also take capital losses on losing investments to offset any capital gains they have. This is especially popular near year-end, as people start to plan their tax returns for the following spring. Tax-loss harvesting can reduce your taxes and also encourage you to get out of losing investments before they fall even further in value.

Because capital gains tax rates rely in part on your overall income, it's generally smarter to sell winners when your other income is low. Selling in a high-income year could force you into the top 20% tax bracket for long-term capital gains, while choosing a lower-income year could let you enjoy 15% or even 0% tax rates.

Last, keep some of the favorable tax rules for retirement accounts in mind as they apply to capital gains. Selling investments inside an IRA or 401(k) won't require you to pay capital gains taxes, as it's only when you take withdrawals from those retirement accounts that you have to worry about any tax implications.

Keep more of your capital gains!

It's great to make a winning investment, and even though the IRS will probably take a cut, capital gains taxes don't have to be a bad thing. By doing what you can to pay less in capital gains tax, you'll be able to keep more of what you were fortunate enough to make from your investing.