Key takeaway
Holding investments for more than a year can mean significantly lower tax rates on your gains.
Capital gains are profits from selling assets that went up in value
A capital gain is the profit you make when you sell an asset—like stocks, bonds, real estate, or even a business—for more than you paid for it. The difference between your sale price and your "cost basis" (what you paid, plus certain adjustments) is your capital gain, and it might be subject to tax.
Not all gains are taxed the same way. The length of time you own the asset before selling it usually determines whether the gain is taxed as a short-term or long-term capital gain, which can make a big difference in how much tax you owe.
Short-term vs long-term capital gains
The two main categories of capital gains are based on your holding period:
- Short-term capital gains: From assets you owned for one year or less. These are taxed at your ordinary income tax rates, the same rates that apply to your salary or wages.
- Long-term capital gains: From assets you owned for more than one year. These are taxed at preferential rates that are usually lower than your ordinary income rate.
For most taxpayers, the long-term capital gains tax rates are 0%, 15%, or 20%, depending on your taxable income. Some higher-income taxpayers might also pay an additional 3.8% net investment income tax on top of that.
This is why holding investments for at least a year and a day can be tax-efficient: it moves the gain from your higher ordinary rate to the lower long-term rate.
How cost basis works
Your cost basis is usually what you paid to acquire the asset, but it can be adjusted in certain situations:
- For stocks, it includes the purchase price plus any commissions or fees you paid when buying.
- If you inherit an asset, your basis is usually the fair market value on the date of the previous owner's death (a "step-up" in basis).
- If you receive an asset as a gift, your basis is usually the same as the giver's basis.
- For stock splits, you divide your original basis across the new number of shares.
- For reinvested dividends, each reinvestment adds to your basis because you already paid tax on the dividend income.
Keeping good records of your cost basis matters because it directly reduces the amount of gain that's taxed when you sell.
Capital losses can offset capital gains
If you sell an asset for less than your cost basis, you have a capital loss. You can use capital losses to offset capital gains:
- Short-term losses first offset short-term gains.
- Long-term losses first offset long-term gains.
- Any remaining losses can offset up to $3,000 of ordinary income per year.
- Losses beyond $3,000 can be carried forward to future tax years.
This is the idea behind "tax-loss harvesting"—selling investments that have lost value to offset gains from other investments, while keeping your overall portfolio allocation roughly the same.
What isn't taxed as a capital gain
Some assets have special rules:
- Primary residence: Up to $250,000 of gain ($500,000 for married couples filing jointly) from selling your main home is usually excluded from tax, as long as you owned and lived in it for at least two of the five years before selling.
- Retirement accounts: Gains inside a 401(k), IRA, or similar retirement account aren't taxed annually. With traditional accounts, you pay ordinary income tax when you withdraw; with Roth accounts, qualified withdrawals are tax-free.
- Most personal property: Gains from selling personal use property (like your car or furniture) are taxable, but losses aren't deductible.
When capital gains tax applies
Capital gains tax is usually triggered when you "realize" the gain by selling the asset. If you hold an asset that has gone up in value but you haven't sold it, that's an "unrealized gain" and you don't owe tax on it yet.
This is why long-term investing can be tax-efficient: you get to decide when to realize the gain, and you can potentially time it in a year when your income (and thus your tax rate) is lower.
How to estimate your capital gains tax
To estimate what you might owe:
- Separate your short-term and long-term gains and losses for the year.
- Net each category (gains minus losses) separately.
- If you have a net gain in both, apply the appropriate tax rates.
- If you have a net loss, use it to offset gains or up to $3,000 of ordinary income.
The actual calculation can get more complex when you add in things like wash sale rules, the net investment income tax, or state capital gains taxes, but this framework covers most situations.
Capital gains are part of your overall tax picture
Capital gains tax isn't the only consideration when deciding to sell an investment. The investment's future prospects, your need for the money, and your overall financial plan usually matter more than the tax consequences alone.
But understanding how capital gains are taxed lets you make more informed decisions about when to sell, how to time the sale, and whether holding on for a longer period might be worth the tax savings.
Related next steps
Use the Capital Gains Tax Calculator to estimate what you might owe on a sale, then check the Income Tax Calculator to see how capital gains fit into your overall tax picture. If you're planning investments, try the Compound Interest Calculator to see how tax-efficient holding periods affect growth.