Key Takeaways
- A capital gain occurs when you sell an investment for more than your original purchase price.
- Assets held over one year qualify for lower long-term capital gains tax rates.
- Short-term gains are taxed as ordinary income, which can mean a significantly higher rate.
- Tax-advantaged accounts like 401(k)s and IRAs can defer or eliminate capital gains taxes.
- Capital losses can offset capital gains, reducing your overall tax bill.
Capital Gain
A capital gain is the profit you earn when you sell an asset — such as a stock, bond, or piece of real estate — for more than you originally paid for it. The difference between your purchase price (called the cost basis) and the sale price is the gain. The IRS generally requires you to report and pay taxes on these gains. The amount of tax you owe depends primarily on how long you held the asset before selling.
Capital gains are reported on Schedule D of IRS Form 1040. Net capital losses can offset gains, with up to $3,000 in excess losses deductible against ordinary income per year.
What Counts as a Capital Gain
A capital gain arises any time you sell a capital asset — something you own for investment or personal use — at a price higher than what you paid. The most common examples include stocks, mutual funds, exchange-traded funds (ETFs), bonds, and real estate. Your cost basis is typically the original purchase price, and the gain is everything above that amount at the time of sale.
For example, if you purchased shares for $2,000 and later sold them for $3,500, your capital gain is $1,500. That $1,500 is what the IRS considers taxable income — not the full $3,500 you received. Understanding the core asset classes can help you recognize which of your holdings may generate capital gains when sold.
Unrealized Gains Are Not Taxed
If your investments have grown in value but you haven't sold them, you have what's called an "unrealized gain." No tax is owed until you actually sell the asset and "realize" the gain. This means you have some control over when a taxable event occurs — a useful consideration in year-end tax planning.
Short-Term vs. Long-Term: Why Holding Period Matters
The single most important factor in how your capital gain is taxed is how long you held the asset before selling it.
- Short-term capital gains apply when you sell an asset you've owned for one year or less. These gains are taxed at your ordinary income tax rate — the same rate applied to your wages. Depending on your income bracket, this could be as high as 37%.
- Long-term capital gains apply when you've held the asset for more than one year. The IRS taxes these at preferential rates: 0%, 15%, or 20%, based on your taxable income and filing status.
This distinction gives investors a meaningful incentive to think carefully about timing. Selling too soon can result in a significantly larger tax bill, even on the same profit.
0%, 15%, or 20%
Long-term capital gains tax rates (federal)
According to the IRS, these three rates apply to most long-term capital gains depending on the taxpayer's filing status and taxable income.
$3,000
Annual capital loss deduction limit against ordinary income
The IRS allows taxpayers to deduct up to $3,000 of net capital losses against ordinary income per year, with any excess carried forward.
1 year
Minimum holding period for long-term treatment
The IRS defines long-term capital gains as gains from assets held for more than one year before sale, qualifying for lower preferential tax rates.
How Capital Losses Can Work in Your Favor
Not every investment ends in a gain. When you sell an asset for less than you paid, you have a capital loss. The tax code allows you to use these losses strategically:
- Capital losses first offset capital gains of the same type (short-term losses offset short-term gains; long-term losses offset long-term gains).
- Remaining losses can then offset gains of the other type.
- If total losses still exceed total gains, you can deduct up to $3,000 against your ordinary income in a given tax year.
- Any unused losses carry forward to future years.
This process — sometimes called tax-loss harvesting — is a legitimate tax planning strategy that investors use to manage their overall tax burden. It's worth noting that the wash-sale rule prohibits claiming a loss if you repurchase the same or a substantially identical security within 30 days before or after the sale.
For a broader look at how investment decisions connect to saving goals, see our guide on saving vs. investing.
Track Your Cost Basis From the Start
Accurate records of what you paid for each investment — including reinvested dividends or additional purchases — are essential for correctly calculating your capital gain or loss when you sell. Many brokerage platforms track cost basis automatically, but it's wise to verify records regularly, especially for older holdings or assets transferred between accounts.
Reducing Capital Gains Through Tax-Advantaged Accounts
One powerful way to minimize capital gains taxes is to hold investments inside tax-advantaged accounts. Inside a traditional 401(k) or IRA, you can buy and sell investments without triggering capital gains taxes at the time of the transaction. Instead, you pay ordinary income tax only when you withdraw funds in retirement. Roth IRAs and Roth 401(k)s go even further — qualified withdrawals are entirely tax-free.
This doesn't eliminate taxes in all cases, but it can significantly defer or reduce them over time. Learn more about how these accounts work in our overview of 401(k)s and IRAs. For a side-by-side look at multiple tax-advantaged options, our article on tax-advantaged account types covers the full landscape.
This article is for general informational and educational purposes only. It is not tax or investment advice. Tax rules are complex and subject to change. Please consult a qualified tax professional or financial adviser for guidance specific to your situation.
