TaxesIntermediate6 min read

Capital gains tax basics

How the IRS taxes investment profits, and why holding one extra day can cut your bill in half.

When you sell an investment for more than you paid, the profit is a capital gain and the IRS wants a cut. But not all cuts are equal — the tax rate depends entirely on how long you held the asset.

Short-term vs. long-term

  • Short-term capital gains: assets held 1 year or less. Taxed as ordinary income — same as your paycheck. Can be 22–37% for most middle-and-upper earners.
  • Long-term capital gains: assets held more than 1 year. Taxed at 0%, 15%, or 20% depending on your income bracket.
A real difference
Sell a stock on day 364 with a $10k gain: taxed at maybe 22% = $2,200. Sell on day 366: taxed at 15% = $1,500. Same money, $700 swing. Waiting two days is one of the highest-hourly-rate decisions you can make.

The 0% bracket exists and is real

If your total taxable income is below ~$48k single or ~$96k married in 2025, your long-term capital gains are taxed at 0%. Retirees and people in transition years can intentionally realize gains in low-income years to pay zero federal tax on them. This is a legitimate planning tool, not a loophole.

Losses offset gains

Capital losses offset gains dollar for dollar. Any remaining loss up to $3,000/year can offset ordinary income. Anything beyond that carries forward forever. See the tax-loss harvesting article for the intermediate version.

The 2025 long-term rates, precisely

RateSingleMarried filing jointly
0%$0 – $48,350$0 – $96,700
15%$48,351 – $533,400$96,701 – $600,050
20%$533,401+$600,051+
+3.8% NIITMAGI over $200,000MAGI over $250,000
2025 long-term capital gains brackets (taxable income)

Two details in that table trip people up. First, the brackets key off TAXABLE income — after the standard deduction — and your ordinary income fills the brackets first, with gains stacking on top. A married couple with $80,000 of taxable wage income and $30,000 of long-term gains pays 0% on the first $16,700 of gains (the space left under $96,700) and 15% on the rest. Second, the 3.8% net investment income tax stacks on top at higher incomes, making the real top rate 23.8% federal.

Cost basis: the number that decides everything

Your gain is sale price minus cost basis — what you paid, including reinvested dividends. Reinvested dividends are the classic overpayment trap: you already paid tax on each dividend the year it arrived, and reinvesting it raises your basis. Forget that, and you'll pay tax on the same money twice. Brokers track basis automatically for shares bought since 2011, but transferred accounts and old holdings can arrive with blank basis fields — and a blank basis means the IRS assumes the entire sale price is profit until you prove otherwise.

Stacking gains into the 0% bracket
Maria retires at 62 with a year of low income before Social Security starts: just $25,000 of taxable income. The 0% bracket for singles runs to $48,350, leaving about $23,000 of headroom. She sells appreciated index funds to realize exactly $23,000 of long-term gains — federal tax on those gains: $0 — and immediately rebuys the same funds (no wash sale rule on GAINS). Her basis resets higher, permanently erasing future tax on that appreciation. Repeat for each low-income year and a retiree can launder six figures of gains at 0% before RMDs and Social Security fill the brackets back up. This is called tax-gain harvesting, and it's entirely legal.

Choosing which shares to sell

When you sell part of a position, your broker needs to know WHICH shares. The default is usually first-in-first-out (FIFO), which sells your oldest — often lowest-basis, highest-gain — shares first. Switching to 'specific identification' lets you pick the highest-basis lots and minimize the realized gain, or deliberately pick loss lots to harvest. It's a dropdown menu at the moment of sale at most brokers, and it can swing the tax bill on a partial sale by thousands of dollars. Set your default cost basis method to specific ID today, before you need it.

State taxes: the layer people forget

Most states tax capital gains as ordinary income with no long-term discount at all. A Californian in the top state bracket pays 13.3% on gains regardless of holding period, making their true long-term rate up to 37.1% with NIIT included; a Floridian pays 0% state on the identical sale. This is why large one-time gains — selling a business, a concentrated stock position, exercised options — sometimes justify timing a genuine relocation before the sale, and why the 'move to Nevada, then sell' pattern gets scrutinized so heavily by high-tax states. For ordinary investors the lesson is smaller but real: your after-tax return math should include the state line, not just the federal one.

Special cases worth knowing

  • Dividends: 'qualified' dividends (most US stock dividends held over 60 days) get the same favorable 0/15/20% rates; interest and 'ordinary' dividends are taxed like wages.
  • Collectibles (gold, art, coins — including some gold ETFs) have their own long-term ceiling of 28%.
  • Inherited assets get a stepped-up basis to date-of-death value — decades of gains vanish, and the holding period is automatically long-term.
  • Your home gets the separate $250k/$500k exclusion (see the home sale article).
  • Tax-advantaged accounts don't care about any of this: trades inside a 401(k), IRA, or Roth trigger no capital gains at all.
Mutual fund distributions can tax you on gains you never took
Actively managed mutual funds in taxable accounts distribute their internal trading gains to shareholders every December — you can owe capital gains tax in a year you sold nothing and even in a year the fund LOST money. Broad index ETFs almost never do this. It's one of the quiet reasons index ETFs dominate taxable investing.

The bottom line

Capital gains taxes reward two behaviors: patience and planning. Hold past one year and your rate drops by a third to a half; realize gains deliberately in low-income years and the rate can hit zero; pick your lots when you sell partial positions; and let losses offset winners. None of it requires exotic strategies — just a calendar, a basis record, and the discipline not to sell on day 364.

The deepest version of the patience principle: unrealized gains are never taxed during your lifetime, and at death the basis steps up entirely, erasing the gain for your heirs. That's why 'buy, hold, borrow if needed, and bequeath' describes how the wealthiest households actually interact with capital gains tax — and why, at every wealth level, the investor who trades less almost always keeps more, even before counting the behavioral benefits of leaving a portfolio alone.

Check your understanding

1 of 3
You have a $10,000 gain on a stock. Selling on day 364 versus day 366 (just past one year) changes your rate from roughly 22% to 15%. Why?

Not quite — try again.

The Worth letter

Get smarter about money every week

One email, no spam — practical guides and Worth updates. Unsubscribe anytime.

Put this into practice

Worth tracks your accounts, budgets, and goals — so the concepts in this article aren't just theory.

Start free trial