Personal Finance
What Is Capital Gains Tax?
A plain-English explainer of capital gains tax: short-term vs long-term, current rates, capital losses, the home-sale exclusion, gains inside tax-advantaged accounts, and how mutual funds report distributions.
Capital gains tax is the tax you owe when you sell something for more than you paid for it. It applies to investments like stocks, bonds, and mutual funds, but also to things like a second home, a piece of land, or even a collectible. The rate depends on what you sold, how long you held it, and your income.
This is a plain-English explainer, not tax advice. For a feel for how investment growth fits into a long-term plan, our investing basics hub is a good starting point. For more vocabulary, see stock and interest rate, and the Learn hub for related topics.
The basic idea
When you sell an asset, the math is simple:
- Sale price minus cost basis = capital gain (or loss).
- Cost basis is what you originally paid, plus certain costs (commissions, improvements to a home).
If the result is positive, you have a gain that may be taxed. If it is negative, you have a loss, which can be used to offset other gains and (within limits) some ordinary income.
The Internal Revenue Service (IRS) at irs.gov lays out the rules in IRS Publication 550 (investment income) and IRS Topic 409 (capital gains).
Short-term vs long-term — the rule that matters most
How long you held the asset before selling decides the tax rate:
- Short-term capital gain — you held the asset one year or less. Taxed at your regular income tax rate.
- Long-term capital gain — you held the asset more than one year. Taxed at the (usually lower) long-term capital gains rate.
This single distinction is one of the biggest reasons buy-and-hold investing is more tax-efficient than frequent trading.
What the long-term rates look like
For example purposes — these brackets change every year, always check the current numbers at irs.gov:
- 0% rate — for filers in the lowest income brackets.
- 15% rate — for most middle-income filers.
- 20% rate — for the highest income brackets.
For comparison, ordinary income (used for short-term gains) is taxed in brackets that currently run from 10% to 37%. The gap between short-term and long-term treatment can be substantial.
There is also an additional Net Investment Income Tax (NIIT) of 3.8% that may apply to investment income for higher-income taxpayers — see IRS Form 8960 instructions.
A worked example
You buy 100 shares of an index fund at $50 per share — a $5,000 cost basis. Two years later you sell at $80 per share — $8,000 sale price.
- Capital gain: $3,000.
- Held over one year: long-term.
- If you are in the 15% long-term bracket: about $450 in tax.
- Net after tax: roughly $2,550 in profit.
If you had sold the same shares at 11 months, the gain would be short-term and taxed at your ordinary income rate, which could mean considerably more tax depending on your bracket.
Capital losses
If you sell at a loss, the loss is not wasted. The IRS lets you:
- Offset other capital gains you had during the year, dollar for dollar.
- Use up to $3,000 of net capital losses per year against ordinary income (smaller for married filing separately).
- Carry forward any remaining loss to future tax years.
This is why some investors do tax-loss harvesting at year end — selling losing positions to offset gains.
The wash sale rule prevents you from claiming a loss if you (or your spouse) buy the same or "substantially identical" investment within 30 days before or after the sale. The IRS explains the rule in IRS Publication 550.
Special rules for selling your home
A different and friendlier rule applies to selling your primary residence. The IRS Section 121 exclusion lets you exclude up to:
- $250,000 of gain if filing single, or
- $500,000 of gain if married filing jointly.
To qualify, you generally must have owned and used the home as your primary residence for at least 2 of the last 5 years. Gains above the exclusion amount are taxed at long-term capital gains rates if you held over a year. The IRS has the full rules at irs.gov (Publication 523).
Capital gains inside tax-advantaged accounts
This is one of the biggest reasons people use 401(k)s, IRAs, and HSAs:
- Inside a Traditional 401(k) or IRA — capital gains are not taxed when realized inside the account. Withdrawals are taxed as ordinary income later.
- Inside a Roth 401(k) or Roth IRA — capital gains grow tax-free, and qualified withdrawals come out tax-free.
- Inside an HSA — capital gains grow tax-free, and qualified medical withdrawals come out tax-free.
In a regular taxable brokerage account, gains are reportable each year as you sell.
See our tax-advantaged accounts overview for the bigger picture.
How mutual funds and ETFs report gains
If you own a stock mutual fund or ETF in a taxable account, two things can happen:
- You sell shares. A normal capital gain or loss applies based on your cost basis.
- The fund sells investments inside it and passes the gain through to you. This is called a capital gains distribution, reported on Form 1099-DIV at year end. You owe tax even if you did not sell anything yourself.
This is one reason ETFs are usually a little more tax-efficient than mutual funds in taxable accounts. The Securities and Exchange Commission's investor.gov covers the difference in plain English.
Crypto, collectibles, and other assets
A few special-case rates and rules:
- Cryptocurrency is generally treated as property for federal tax purposes. Selling, exchanging, or spending crypto can trigger a capital gain or loss based on cost basis. The IRS guidance is at irs.gov.
- Collectibles (coins, art, etc.) held over a year can be taxed at a higher long-term rate (currently up to 28%, for example only).
- Real estate other than your primary home does not get the Section 121 exclusion. Land, second homes, and rental properties are taxed at standard capital gains rates. Depreciation rules add complexity for rentals.
How to actually report capital gains
The basic flow on a federal return:
- Your broker sends a Form 1099-B at year end with each sale.
- You report sales on IRS Form 8949 and totals carry to Schedule D.
- The total long-term and short-term gains feed into your Form 1040.
- Any capital gain distributions from funds appear on Form 1099-DIV and are also reported.
Tax software, IRS Free File for those who qualify, and a CPA all walk through this in different ways.
Free help
- IRS Topic 409 at irs.gov/taxtopics/tc409 covers capital gains.
- IRS Publication 550 covers investment income generally.
- IRS Free File at irs.gov/freefile for taxpayers under the income limit.
- USA.gov's tax hub at usa.gov/taxes.
- The Investor.gov compound interest calculator at investor.gov.
- Your state Department of Revenue for state-level capital gains rules (some states tax capital gains at ordinary income rates; a few do not tax them at all).
A note on advice
This is general information, not tax advice. Capital gains rules interact with your full income picture, your filing status, and your state in ways that can swing the actual tax owed. Talk to a CPA for your specific situation.
Numbers and rules in this article change every year — always check the latest from the IRS, CFPB, and your state's consumer protection department.
Common questions
What is capital gains tax?
It is the tax you owe when you sell something for more than you paid. The gain is sale price minus cost basis. The rate depends on how long you held the asset and your income. The IRS covers it in Topic 409 at irs.gov/taxtopics/tc409 and Publication 550.
What is the difference between short-term and long-term capital gains?
Short-term gains are on assets held one year or less and are taxed at your regular income tax rate. Long-term gains are on assets held more than one year and are taxed at the lower long-term capital gains rates (currently 0%, 15%, or 20% depending on income, for example only). This is one of the biggest reasons buy-and-hold investing is more tax-efficient than frequent trading.
What happens if I sell at a loss?
The loss is not wasted. You can offset other capital gains dollar for dollar, deduct up to $3,000 per year against ordinary income (smaller for married filing separately), and carry forward any remaining loss to future tax years. Watch out for the wash sale rule — buying the same or substantially identical investment within 30 days before or after the sale disallows the loss.
Do I owe capital gains tax when I sell my home?
Often no, up to a limit. The IRS Section 121 exclusion lets you exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) when selling your primary residence, if you owned and used it as your main home for at least 2 of the last 5 years. Gains above the exclusion are taxed at long-term capital gains rates. See IRS Publication 523 at irs.gov.
Are gains in my 401(k) or IRA taxed?
Not when realized inside the account. In a Traditional 401(k) or IRA, gains grow tax-deferred and are taxed only when you withdraw. In a Roth 401(k) or Roth IRA, gains grow tax-free and qualified withdrawals are tax-free. In an HSA, gains grow tax-free and qualified medical withdrawals are tax-free. In a regular taxable brokerage account, gains are reported each year as you sell. The IRS rules are at irs.gov.
Sources
- IRS Topic 409: Capital Gains and Losses IRS as of May 2026
- IRS: Publication 550 (Investment Income) IRS as of May 2026
- IRS: Publication 523 (Selling Your Home) IRS as of May 2026
- IRS Free File FreeFile as of May 2026
- USA.gov: Taxes USA Tax as of May 2026
Keep reading
-
Every Paycheck Deduction, Explained
A plain-English walk through every common paycheck deduction: federal income tax, FICA (Social Security and Me...
-
Money Lessons in Your 20s, 30s, and 40s
A gentle, aspirational guide to money themes by decade: building the foundation in your 20s, stacking layers i...
-
Should You Refinance? A Decision Framework
A plain-English decision framework for refinancing a mortgage, auto loan, or student loan: define the goal, fi...
-
Recession-Proofing Your Finances Without Panic
A calm, plain-English guide to recession-proofing your finances: build a cash buffer, diversify income, avoid...