It's easy to get caught up in choosing investments and forget about the tax consequences—most particularly, capital gains tax. After all, picking the right stock or mutual fund can be difficult enough without worrying about after-tax returns. The same thing is true when you invest in other types of assets, such as your home.

However, figuring taxes into your overall strategy—and timing when you buy and sell—is crucial to getting the most out of your investments. Here, we look at the capital gains tax and what you can do to minimize it.

Key Takeaways

  • A capital gain occurs when you sell an asset for more than you paid for it.
  • If you hold an investment for more than a year before selling, your profit is considered a long-term gain and is taxed at a lower rate.
  • You can minimize or avoid capital gains taxes by investing for the long term, using tax-advantaged retirement plans, and offsetting capital gains with capital losses.

Capital Gains: The Basics

capital gain occurs when you sell an asset for more than you paid for it. Expressed as an equation, that means:

Capital Gain=Selling PricePurchase Price\begin{aligned} &\text{Capital Gain}=\text{Selling Price}-\text{Purchase Price}\\ \end{aligned}Capital Gain=Selling PricePurchase Price

Just as the government wants a cut of your income, it also expects a cut when you realize a profit on your investments. That cut is the capital gains tax.

For tax purposes, it's useful to understand the difference between realized gains and unrealized gains. A gain is not realized until the appreciated investment is sold. Say, for example, you buy some stock in a company and a year later it's worth 15% more than you paid for it. Although your investment has increased in value, you will not realize any gains, or owe any tax, unless you sell it.

Which Assets Qualify for Capital Gains Treatment?

Capital gains taxes apply to what are known as capital assets. For example, stocks, bonds, jewelry, coin collections, and your home are all considered capital assets.

However, not every capital asset you might own will qualify for capital gains treatment, including:

  • Business inventory  
  • Depreciable business property

Also excluded from capital gains treatment are certain items (noncapital assets) you created or have had produced for you:

  • Copyright; a literary, musical or artistic composition; a letter; a memorandum; or similar property (e.g., drafts of speeches, recordings, transcripts, manuscripts, drawings, or photographs)
  • A patent, invention, model, or design (patented or not); also a secret formula or process sold after 2017

Short-Term vs. Long-Term Capital Gains

The tax you'll pay on a capital gain depends on how long you held the asset before selling it.

To qualify for the more favorable long-term capital gains rates, assets must be held for more than one year.

Any gains on assets you've held for one year or less are short-term capital gains, which are taxed at your higher, ordinary income rate. The tax system in the United States is set up to benefit the long-term investor. Short-term investments are almost always taxed at a higher rate than long-term investments.

An Example of How the Capital Gains Tax Works

Say you bought 100 shares of XYZ stock at $20 per share and sold them more than a year later for $50 per share. Let's also assume that you fall into the income category (see "What You'll Owe," below) where your long-term gains are taxed at 15%. The table below summarizes how your gains from XYZ stock are affected.

How Capital Gains Affect Earnings
Bought 100 shares @ $20 $2,000
Sold 100 shares @ $50 $5,000
Capital gain $3,000
Capital gain taxed @ 15% $450
Profit after tax $2,550

In this example, $450 of your profit will go to the government. But it could be worse. Had you held the stock for one year or less (making your capital gain a short-term one), your profit would have been taxed at your ordinary income tax rate, which can be as high as 37%. And that's not counting any additional state taxes.

Today's Capital Gains Rates

While the tax rates for individuals' ordinary income are 10%, 12%, 22%, 24%, 32%, 35%, and 37%, long-term capital gains rates are taxed at different, generally lower rates. The basic capital gains rates are 0%, 15%, and 20%, depending on your taxable income. The breakpoints for these rates are explained later.

Although marginal tax brackets have changed over the years, historically, as this chart from the Tax Policy Center shows, the maximum tax on ordinary income has almost always been significantly higher than the maximum rate on capital gains.

A graph comparing maximum capital gains and individual income tax rate over time since 1954.



There are two other types of capital gains taxes you may encounter:

  • Gains on collectibles, such as artworks and stamp collections, are taxed at a 28% rate. That same rate applies to the portion of gain on the sale of qualified small business stock that isn't excluded from tax (Section 1202 stock).
  • Capital gains on the sale of a principal residence are taxed differently from other real estate, due to a special exclusion. Basically, the first $250,000 of an individual's profit on the sale of a home is excluded from their income for that year, as long as the seller has owned and lived in the home for two years or more. For married couples filing jointly, the exclusion is $500,000.

In addition to regular capital gains tax, some taxpayers are subject to the net investment income tax. It imposes an additional 3.8% tax on your investment income, including your capital gains, if your modified adjusted gross income is greater than:

  • $250,000 if married filing jointly or a surviving spouse
  • $200,000 if single or a head of household
  • $125,000 if married filing separately

What You'll Owe

Before 2018, the basic long-term capital gains tax rates were determined by your tax bracket. If, for example, your taxable income put you in one of the two lowest brackets, your capital gains had a zero tax rate and none of your gains were taxed.

The Tax Cuts and Jobs Act changed the breakpoints for the basic capital gains rates to align with taxable income (not tax brackets). The following chart shows the breakpoints for 2019 based on your filing status and taxable income: 

The Three Levels of Long-Term Capital Gains Tax, 2019
 

Filing Status

 

0%

 

15%

 

20%

 

Single

 

Up to $39,375

 

$39,376 to $434,550

 

Over $434,550

 

Head of household

 

Up to $52,750

 

$52,751 to $461,700

 

Over $461,700

 

Married filing jointly and surviving spouse

 

Up to $78,750

 

$78,751 to $488,850

 

Over $488,850

 

Married filing separately

 

Up to $39,375

 

$39,376 to $244,425

 

Over $244,425



How to Figure Your Capital Gains Tax

Most individuals figure their tax (or have pros do it for them) using software that automatically makes the computations. But if you want to get an idea of what you may pay on a potential or actualized sale, you can use a capital gains calculator to get a rough idea. Several free ones are available online.

Five Ways to Minimize or Avoid Capital Gains Tax

There are a number of things you can do to minimize or even avoid capital gains taxes:

1. Invest for the long term. 

If you manage to find great companies and hold their stock for the long term, you will pay the lowest rate of capital gains tax. Of course, this is easier said than done. A company's fortunes can change over the years, and there are many reasons you might want or need to sell earlier than you originally anticipated.

2. Take advantage of tax-deferred retirement plans. 

When you invest your money through a retirement plan, such as a 401(k), 403(b), or IRA, it will grow without being subject to immediate taxes. You can also buy and sell investments within your retirement account without triggering capital gains tax.

In the case of traditional retirement accounts, your gains will be taxed as ordinary income when you withdraw money, but by then you may be in a lower tax bracket than when you were working. With Roth accounts, however, the money you withdraw will be tax-free, as long as you follow the relevant rules.

For investments outside of these accounts, it might behoove investors who are near retirement to wait until they actually stop working to sell. If their retirement income is low enough, their capital gains tax bill might be reduced or they may be able to avoid paying any capital gains tax. But if they're already in one of the "no-pay" brackets, there's a key factor to keep in mind: If the capital gain is large enough, it could increase their income to a level where they'd incur a tax bill on their gains.

You can use capital losses to offset your capital gains as well as a portion of your regular income. Any amount that's left over after that can be carried over to future years.

3. Use capital losses to offset gains. 

If you experience an investment loss, you can take advantage of it by decreasing the tax on your gains on other investments. Say you own two stocks, one of which is worth 10% more than you paid for it, while the other is worth 5% less. If you sold both stocks, the loss on the one would reduce the capital gains tax you'd owe on the other. Obviously, in an ideal situation, all of your investments would appreciate, but losses do happen, and this is one way to get some benefit from them.

If you have a capital loss that's greater than your capital gain, you can use up to $3,000 of it to offset ordinary income for the year. After that, you can carry over the loss to future tax years until it is exhausted.

4. Watch your holding periods. 

If you are selling a security that you bought about a year ago, be sure to find out the trade date of the purchase. Waiting a few days or weeks in order to qualify for long-term capital gains treatment might be a wise move as long as the price of the investment is holding relatively steady.

5. Pick your cost basis. 

When you've acquired shares in the same company or mutual fund at different times and at different prices, you'll need to determine your cost basis for the shares you sell. Although investors typically use the first in, first out (FIFO) method to calculate cost basis, there are four other methods available: last in, first out (LIFO), dollar value LIFO, average cost (only for mutual fund shares), and specific share identification.

If you're selling a substantial holding, it could be worth consulting a tax advisor to determine which method makes the most sense.

The Bottom Line

Although the tax tail should not wag the entire financial dog, it's important to take taxes into account as part of your investing strategy. Minimizing the capital gains taxes you have to pay, such as by holding investments for over a year before you sell them, is one easy way to boost your after-tax returns.