In this scenario, you'd deduct all $5,000 of your capital losses. However, you'd have to use $4,000 of it to offset your long-term gains first. The other $1,000 could then be used to offset your short-term gains. This would still leave you with a $1,000 short-term capital gain.
Second, if your capital losses exceed your capital gains, you can use them to reduce your other taxable income -- such as the money you earned from a job. However, there's a limit. When it comes to reducing your other taxable income, you're limited to $3,000 in investment losses each year. Any excess can be carried over to the next tax year.
An example of investment loss carryover
Here's an example to help illustrate how this works. Consider the following scenario:
You have a total of $100,000 in taxable income from your job in 2019 after applying all deductions. You also have a $4,000 long-term capital gain from a stock investment you sold and a $12,000 long-term capital loss from an investment that went bad.
You could use the $12,000 loss to erase your $4,000 capital gain, which leaves you with a net investment loss of $8,000 for the year. You could use $3,000 of this amount to reduce your other taxable income, bringing your total down to $97,000. This leaves another $5,000 in long-term investment losses that you can't do anything with. However, you can use this amount in your gain and loss tracking when you prepare your 2020 tax return. It would then be applied according to the rules in the previous section until you eventually deduct it in full.
Two special rules for real estate capital gains
Certain types of assets have special rules that apply to their capital gains taxation. Real estate is the most common example. Specifically, two rules could affect your capital gains taxes when it comes to the profitable sale of real estate -- one that affects homeowners and another that affects investors.
Homeowners get a nice capital gains tax break when they sell their home. The first $250,000 in net profit ($500,000 for those filing joint returns) from the sale is excluded from capital gains taxation.
Imagine you and your spouse buy a home for $300,000 and sell it for $1 million many years later. Even though you made a $700,000 profit on the sale, only $200,000 of it will be considered a long-term capital gain by the IRS. To be clear, this rule only applies to the sale of a primary home -- if you sell a vacation home or other property, you don't get this favorable capital gains treatment.
Investors aren't quite so fortunate -- at least upon the sale of real estate. During the ownership period, investors can deduct a portion of the property's cost each year to lower their taxable rental income. This is known as depreciation. For example, an investment property that cost $200,000 would be entitled to a $7,273 annual depreciation deduction. If you want to learn more about the mathematics of depreciation, check out our thorough guide. The point is that this is a big tax benefit for investment property owners.
The drawback is that the IRS wants this benefit back when the property is sold. This is known as depreciation recapture -- the cumulative depreciation deductions you've taken on a property are considered a capital gain when you sell. If you've claimed $50,000 of depreciation during the time you owned an investment property, you'll have an additional $50,000 capital gain.
So, you have to pay capital gains tax not only on the profit from the sale, but on the depreciation you've used as well. The sale profits from a property are taxed as regular long- or short-term capital gains, depending on how long you owned the property. The depreciation recapture portion of the capital gains will be taxed at a 25% rate, regardless of the investment holding period or your income level.
High earners pay another tax on investment income
In addition to all of the capital gains tax rates and rules, higher earners have to pay an additional net investment income tax (NIIT). This is a 3.8% surtax intended to fund the Affordable Care Act (Obamacare). It applies to income from investments. It can be applied to both long- and short-term capital gains, interest income, stock dividends, rental income from investment properties, and passive business income.
If this tax applies, the 20% long-term capital gains tax rate effectively becomes 23.8%. For short-term gains, investors in the 37% bracket would end up paying 40.8% for federal taxes if the NIIT applies.
Does it apply to you? Here are the rules:
- If you're a single tax filer and have adjusted gross income (AGI) above $200,000, the tax applies to any net investment income above that limit. For example, if you earn $180,000 from your job and have $50,000 in net investment income, the NIIT would apply to $30,000 of your net investment income -- the portion that pushes your income above the $200,000 limit.
- If you're a joint filer, the AGI threshold is $250,000.
- Remember that this only applies to investment income. If you're married and file a joint return, and you and your spouse earned $300,000 and had $20,000 in investment income, the NIIT would only apply to the $20,000. If you didn't have any investment income, you won't pay the NIIT on any of your income, regardless of how much you earned.
How much were your capital gains?
The idea of net capital gain is important to remember. You're only taxed on the capital gain or loss you make after accounting for transaction costs and improvements you've made.
With real estate, for example, if you buy a home with a purchase price of $200,000 and spend $30,000 adding a pool, your cost basis will rise to $230,000 for capital gains purposes. Any transaction costs are also included, such as closing costs, legal fees, and real estate agent commissions.
The same idea applies to other types of assets. Did you pay a trading commission when buying or selling a stock or mutual fund? That's something to consider when calculating capital gains.
Let's use a real estate example. Let's say you buy an investment property for $150,000. You immediately spend $30,000 renovating the kitchen and bathrooms. When you buy the property, you pay $2,000 in various fees and legal charges. This makes your cost basis $182,000. (Note: To keep things simple, I'm ignoring depreciation recapture.)
Several years later, you decide to sell the property and accept an offer for $300,000. You pay $18,000 in commission to real estate agents and another $2,000 in transaction costs, bringing your net sale price down to $280,000.
So, you sold the property for $150,000 more than you paid for it. However, your net capital gain is the difference between the net sale price and your cost basis, which works out to $98,000. It's a very smart idea to keep track of any transaction costs or other capital expenditures, as they can make a big difference in your eventual capital gains tax.
Avoiding capital gains with retirement accounts
Capital gains tax is a moot point when it comes to tax-advantaged retirement accounts like traditional and Roth IRAs, 401ks, SEP-IRAs, and SIMPLE IRAs.
All of these accounts allow for tax-deferred investment growth. This means you don't have to pay any tax on the interest or dividends received in the account -- nor do you have to pay capital gains tax upon the profitable sale of an investment. If you sell a stock at a $50,000 gain in 2019, but you own it in your IRA, you won't have to report a cent of this gain to the IRS on your 2019 tax return.
There are two main categories of retirement accounts -- pre-tax and after-tax. Pre-tax retirement accounts include traditional IRAs and 401ks. With these account types, you can typically deduct all of your contributions on your current-year tax return, up to the IRS's annual limit, but any eventual withdrawals will be taxable income. After-tax accounts (pretty much anything with "Roth" in the name) don't offer a tax deduction for contributions, but any qualified withdrawals from the account will be 100% tax-free.
In either case, there's no tax liability while the assets are held in the account.
Capital gains taxes can take a big bite out of your investment returns, and the avoidance of capital gains tax is one of the most compelling reasons to invest as much as you can within your IRA or other tax-advantaged retirement accounts.
Knowing the rules can make you a better investor
By knowing how capital gains and their tax implications work, you'll be in a better position to make smart investment decisions.
For example, maybe you should hold on to a winning investment until it's considered a long-term gain. Or maybe you should sell a stock gradually over a few years in order to spread your gains out and avoid higher tax brackets.
These are the kinds of decisions you'll be well-equipped to make by understanding capital gains.