Understanding capital gains tax
When you sell an investment for more than you paid, the profit is taxable. But the rate depends on how long you held it — and knowing the difference between short-term and long-term treatment can save thousands of dollars.
Most people think they owe tax on whatever profit they make selling an investment. The reality is more useful than that: the rate you pay depends almost entirely on how long you held it before selling.
- Held one year or less: short-term capital gain, taxed as ordinary income
- Held more than one year: long-term capital gain, taxed at preferential rates
That distinction is worth real money. A long-term gain in the 15% bracket versus a short-term gain taxed at 22% ordinary income is a 7-percentage-point difference. On a $50,000 gain, that’s $3,500 — for doing nothing except waiting.
The 2026 long-term capital gains rates
Long-term capital gains have their own tax brackets, separate from ordinary income:
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451 – $545,499 | Above $545,500 |
| Married filing jointly | Up to $98,900 | $98,901 – $613,699 | Above $613,700 |
| Head of household | Up to $66,200 | $66,201 – $579,599 | Above $579,600 |
The 0% bracket is the one most people overlook. If your taxable income — including the gain itself — falls below $49,450 (single) or $98,900 (MFJ), you owe zero federal tax on long-term gains. This is a significant planning opportunity for early retirees managing their income in a given year.
Short-term gains are taxed at ordinary income rates
Short-term gains get no special treatment. They stack on top of your regular income and are taxed at your marginal rate. For most working Americans, that’s 22%, 24%, or higher.
This is why day trading and frequent stock flipping is so tax-inefficient. Every profitable trade held less than a year gets fully taxed as ordinary income. Full stop.
Cost basis — what you actually owe tax on
Your capital gain is sale price − cost basis. Cost basis is typically what you paid, including commissions.
If you bought 100 shares at $30 and sold at $50: gain = $2,000.
If you inherited shares: your basis is the fair market value at the date of the original owner’s death — the stepped-up basis rule. This is one of the most valuable tax provisions in US law. Gains built up over decades can pass to heirs completely tax-free.
If you received shares as a gift: your basis carries over from the giver. The gift doesn’t reset the clock.
Dividend reinvestment: each reinvested dividend creates a new lot with its own basis and holding period. Brokerage software tracks this automatically, but it’s worth understanding why your “simple” index fund sale might generate a surprisingly complex tax form.
The wash-sale rule
If you sell a security at a loss and buy a “substantially identical” security within 30 days before or after the sale, the loss is disallowed for tax purposes.
This matters for tax-loss harvesting: you can sell an S&P 500 ETF at a loss and immediately buy a Total Market ETF — not substantially identical — to maintain market exposure. You cannot sell VOO at a loss and immediately buy VOO back. The wash sale disallows the loss.
The 30-day window applies both before and after the sale. Planning trades around this window is a core part of systematic tax-loss harvesting.
Capital gains in retirement accounts
Inside a 401(k) or traditional IRA, capital gains taxes don’t apply. You pay ordinary income tax when you withdraw money, regardless of whether those withdrawals came from gains or original contributions.
Inside a Roth IRA or Roth 401(k), qualified distributions are completely tax-free — including gains. A stock that grows 10× inside a Roth generates no capital gains tax on withdrawal.
In a taxable brokerage account, you pay capital gains tax on gains in the year you realize them by selling. Unrealized gains — paper profits you haven’t sold — are not taxable. This is why long-term investors in taxable accounts have so much control over their tax bills.
Net Investment Income Tax (NIIT)
If your modified adjusted gross income exceeds $200,000 (single) or $250,000 (MFJ), long-term capital gains are subject to an additional 3.8% Net Investment Income Tax. This makes the effective top rate on long-term gains 23.8% — not 20%. Factor that in before assuming you’re in the 20% bracket.
Strategies to reduce capital gains tax
Hold for more than one year. The simplest and most powerful strategy. Waiting a single day past the one-year mark converts a short-term gain to long-term. That’s it.
Tax-loss harvesting. Realize losses in a down year to offset gains. A taxable brokerage holding a mix of winners and losers almost always has harvesting opportunities.
0% bracket management. Early retirees or people in low-income years can realize long-term gains at 0% federal tax. This is particularly powerful for people following FIRE strategies.
Asset location. Hold high-dividend and bond funds in tax-advantaged accounts. Hold growth equity in taxable accounts where you control the timing of gains.
Charitable giving. Donating appreciated securities directly to a charity — rather than selling, paying tax, and donating cash — eliminates capital gains tax on the donation and gives a full fair-market-value deduction. A donor-advised fund makes this practical.
Stepped-up basis planning. Highly appreciated assets held until death pass to heirs at stepped-up basis, eliminating the gain. This is controversial as a planning strategy but is current law.
State capital gains taxes
Many states tax capital gains as ordinary income. Some (like California) have no preferential long-term rate — gains are taxed at your top marginal state rate regardless of holding period. Others (like Washington state) have no income tax but do have a capital gains tax on large gains above a threshold.
Federal rates are just the start. Factor in state taxes for a complete picture, especially for large transactions.
Further reading
- 401k vs. Roth calculator — compare pre-tax and post-tax retirement accounts across different tax scenarios
- Retirement / FIRE calculator — plan withdrawals with tax-efficiency in mind
- IRS: Topic No. 409, Capital Gains and Losses — authoritative source on rates, holding periods, and special cases
This article is educational, not financial, tax, or legal advice. Talk to a licensed professional before acting on anything you read here.