In 2018 the capital gains tax rates are either 0%, 15% or 20% for most assets held for more than a year. Capital gains tax rates on most assets held for less than a year correspond to ordinary income tax brackets.

Capital gains are the profits from the sale of an asset — shares of stock, a piece of land, a business — and generally are considered taxable income. A lot depends on how long you held the asset before selling.

Short-term capital gains tax is on profits from the sale of an asset held for one year or less. Short-term capital gains tax rates equal your ordinary income tax rate — your tax bracket. Long-term capital gains tax is on profits from the sale of an asset held for more than a year.

Capital gains tax rules can be different for home sales.

2018 capital gains tax rates

Single Filers

Long-term capital gains tax rate           Your income

0%                                                              $0 to $38,600

15%                                                            $38,601 to $425,800

20%                                                            $425,801 or more

Married, filing jointly

Long-term capital gains tax rate           Your income

0%                                                              $0 to $77,200

15%                                                            $77,201 to $479,000

20%                                                            $479,001 or more

Head of household

Long-term capital gains tax rate           Your income

0%                                                              $0 to $51,700

15%                                                            $51,701 to $452,400

20%                                                            $452,401 or more

Married, filing separately

Long-term capital gains tax rate           Your income

0%                                                              $0 to $38,600

15%                                                            $38,601 to $239,500

20%                                                            $239,501 or more

How capital gains are calculated

Capital gains taxes can apply on investments, such as stocks or bonds, real estate (though usually not your home), cars, boats and other tangible items.

The money you make on the sale of any of these items is your capital gain. Money you lose is a capital loss.

You can use investment capital losses to offset gains. For example, if you sold a stock for a $10,000 profit this year and sold another at a $4,000 loss, you’ll be taxed on capital gains of $6,000.

The difference between your capital gains and your capital losses is called your “net capital gain.” If your losses exceed your gains, you can deduct the difference on your tax return, up to $3,000 per year ($1,500 for those married filing separately).

You include your capital gain in your income to figure out what tax rate applies to the capital gain. Capital gains taxes are progressive, similar to income taxes.

Watch out for two things

1. Rule exceptions. The capital gains tax rates in the table apply to most assets, but there are some noteworthy exceptions. Long-term capital gains on so-called “collectible assets” are generally taxed at 28 percent; these are things like coins, precious metals, antiques and fine art. Short-term gains on such assets are taxed at the ordinary income tax rate.

2. The net investment income tax. Some investors may owe an additional 3.8 percent that applies to whichever is smaller: your net investment income or the amount by which your modified adjusted gross income exceeds the amounts listed below.

Here are the income thresholds that might make investors subject to this additional tax:

• Single or head of household: $200,000

• Married, filing jointly: $250,000

• Married, filing separately: $125,000

How to minimize capital gains taxes

• Hold on. Whenever possible, hold an asset for a year or longer so you can qualify for the long-term capital gains tax rate, since it’s significantly lower than the short-term capital gains rate for most assets.

• Exclude home sales. To qualify, you must have owned your home and used it as your main residence for at least two years in the five-year period before you sell it. You also must not have excluded another home from capital gains in the two-year period before the home sale. If you meet those rules, you can exclude up to $250,000 in gains from a home sale if you’re single and up to $500,000 if you’re married filing jointly.

• Rebalance with dividends. Rather than reinvest dividends in the investment that paid them, rebalance by putting that money into your underperforming investments. Typically, you’d rebalance by selling securities that are doing well and putting that money into those that are underperforming. But using dividends to invest in underperforming assets will allow you avoid selling strong performers — and thus avoid capital gains that would come from that sale.

• Use tax-advantaged accounts. These include 401(k) plans, individual retirement accounts and 529 college savings accounts, in which the investments grow tax-free or tax-deferred. That means you don’t have to pay capital gains tax if you sell investments within these accounts. Roth IRAs and 529s in particular have big tax advantages. Qualified distributions from those are tax-free; in other words, you don’t pay any taxes on investment earnings. With traditional IRAs and 401(k)s, you’ll pay taxes when you take distributions from the accounts in retirement.

• Carry losses over. If your net capital loss exceeds the limit you can deduct for the year, the IRS allows you to carry the excess into the next year, deducting it on that year’s return.

• Consider a robo-advisor. Robo-advisors are online services that manage your investments for you automatically. They often include tax strategy, including tax-loss harvesting, which involves selling losing investments to offset the gains from winners.