Here’s the rule that drives almost everything else: if you sell an investment for more than you paid and you owned it for more than one year, the profit is a long-term capital gain and gets lower tax rates of 0%, 15% or 20%. Own it for one year or less, and the profit is a short-term gain, taxed at the same rates as your paycheck, from 10% up to 37%.
That single day between “one year” and “more than one year” can change the federal tax on a gain by as much as 20 percentage points. The rest of this guide covers how the math works, the 2026 brackets, and the planning moves that follow from them.
What counts as a capital gain
A capital gain is the difference between what you receive when you sell a capital asset and your cost basis, which is usually what you paid plus commissions and certain other costs. Capital assets include stocks, bonds, mutual funds, ETFs, crypto, real estate, collectibles and most other things you own for investment or personal use.
A few points that trip people up:
- You only owe tax when you sell. A stock that doubles in value but stays in your account creates no tax bill yet. That’s an unrealized gain.
- Funds can hand you gains you didn’t choose. Mutual funds distribute capital gains from their own trading, usually near year-end, and you owe tax on them in a taxable account even if you reinvested.
- Retirement accounts are different. Buying and selling inside a 401(k), traditional IRA or Roth IRA doesn’t trigger capital gains tax. Traditional account withdrawals are taxed as ordinary income; qualified Roth withdrawals aren’t taxed at all.
Counting the holding period
The holding period starts the day after you buy and includes the day you sell. Buy on March 10, 2025, and you need to sell on March 11, 2026, or later for the gain to be long-term. Your broker’s 1099-B labels each sale as short- or long-term, but if you’re timing a sale yourself, check the purchase date on each tax lot.
Some assets come with special rules. Inherited assets are treated as long-term regardless of how long you or the deceased held them, and they generally get a “stepped-up” basis equal to their value at the date of death. Gifted assets usually carry over the giver’s basis and holding period.
2026 long-term capital gains brackets
The thresholds below come from IRS Revenue Procedure 2025-32, which sets the inflation adjustments for tax year 2026 (returns filed in 2027). They apply to taxable income, meaning income after deductions, not your salary.
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451 – $545,500 | Over $545,500 |
| Married filing jointly | Up to $98,900 | $98,901 – $613,700 | Over $613,700 |
| Married filing separately | Up to $49,450 | $49,451 – $306,850 | Over $306,850 |
| Head of household | Up to $66,200 | $66,201 – $579,600 | Over $579,600 |
Long-term gains stack on top of your ordinary income. Your salary and other ordinary income fill the brackets first, and your gains land in whatever space is left. So a hypothetical single filer with $40,000 of taxable ordinary income and a $15,000 long-term gain would pay 0% on the first $9,450 of the gain (up to the $49,450 line) and 15% on the remaining $5,550.
Qualified dividends use these same 0%, 15% and 20% rates. Ordinary dividends, including most REIT dividends, are taxed like wages.
Exceptions to the 0/15/20 structure
- Collectibles such as art, coins, precious metals and many precious-metal ETFs: long-term gains taxed at up to 28%.
- Unrecaptured Section 1250 gain from depreciated real estate: taxed at up to 25%.
- Qualified small business stock can be partially or fully excluded under Section 1202 if strict rules are met.
The 3.8% net investment income tax
Higher earners may owe an extra 3.8% on investment income, including capital gains, when modified adjusted gross income exceeds $200,000 for single and head-of-household filers, $250,000 for married couples filing jointly, or $125,000 for married filing separately. These thresholds are set in the law and aren’t adjusted for inflation, so more households cross them each year. Combined with the 20% rate, the top federal rate on long-term gains is effectively 23.8%.
How losses offset gains
Capital losses are netted against gains. Short-term losses first offset short-term gains and long-term losses offset long-term gains, then any net loss in one category offsets net gain in the other. If you end up with a net loss for the year, you can deduct up to $3,000 of it against ordinary income ($1,500 if married filing separately). Anything beyond that carries forward to future years with no expiration.
Selling losers on purpose to capture this benefit is called tax-loss harvesting. The main trap is the wash sale rule: if you buy the same or a “substantially identical” security within 30 days before or after the sale, the loss is disallowed for now. Our tax-loss harvesting guide walks through it.
Selling your home
A main home gets its own break. If you owned and lived in it for at least two of the five years before the sale, you can exclude up to $250,000 of gain from income, or $500,000 for married couples filing jointly, subject to the IRS rules in Publication 523. Gains above the exclusion are taxed as capital gains.
Planning around taxes
Taxes shouldn’t be the only reason to buy or sell, but a few habits can save real money:
- Check the date before you sell. If a winning position is a few weeks short of the one-year mark and nothing has changed about why you own it, waiting can cut the rate sharply.
- Use the 0% bracket. In years with low income, such as early retirement, a gap year or a year between jobs, you may be able to realize long-term gains at 0% and reset your basis higher.
- Put tax-heavy holdings in tax-advantaged accounts. Bond funds, REITs and actively traded strategies generate more taxable income; broad stock index funds are usually more tax-efficient in a taxable account.
- Pick specific lots. When you sell part of a position, choose the shares with the highest basis or longest holding period instead of letting your broker default to first-in, first-out.
- Give appreciated shares instead of cash. Donating long-held stock to a qualified charity can avoid the gain entirely and still allow a deduction if you itemize.
- Watch your state. Most states tax capital gains as regular income; a few have no income tax at all.
For the official details, see IRS Topic 409, Capital Gains and Losses.
Frequently asked questions
Do I owe capital gains tax if I reinvest the money right away?
Yes, in a taxable account. Selling is the taxable event; what you do with the cash afterward doesn’t matter. The exception is real estate swapped under a Section 1031 like-kind exchange, which doesn’t apply to stocks or funds.
Can a capital gain push me into a higher income tax bracket?
A long-term gain won’t change the rate on your wages, but it raises your adjusted gross income. That can affect things tied to AGI, such as the 3.8% surtax, eligibility for certain credits, and Medicare premiums for retirees.
Do I need to pay estimated taxes on a big gain?
Possibly. If a large gain means your withholding won’t cover at least the IRS safe-harbor amount, you may owe an underpayment penalty. Paying an estimated tax in the quarter of the sale, or raising your paycheck withholding, avoids it.
How is crypto taxed?
The IRS treats cryptocurrency as property, so the same short-term and long-term rules apply when you sell, trade one coin for another, or spend it.



