How Capital Gains Tax Works

Sell an asset for more than you paid and the profit is a capital gain — and the tax on it depends on how long you held it, not on how much you earned that year. Hold for more than a year and the gain is taxed at 0%, 15% or 20% under the 2026 thresholds in IRS Revenue Procedure 2025-32: a single filer pays 0% while total taxable income stays under $49,450. This guide works the stacking arithmetic with BeadCalc's [income tax calculator](/finance/income-tax-calculator/) — the same $40,000 and $80,000 wage examples, with a gain added on top — plus the 3.8% surtax and the home-sale exclusion. Figures verified November 17, 2026. For education only — this explains a mechanism, not tax advice.

By the BeadCalc team · Last updated: November 17, 2026 · 8 min read

Short-term vs long-term: the one-year line

The first split is the holding period. Sell an asset you held for one year or less and the gain is short-term: it is taxed as ordinary income, at your marginal rate, exactly like an extra paycheck. Hold it for more than one year — one year plus a day counts — and the gain is long-term, taxed at the preferential 0%, 15% or 20% rates. The calendar, not the size of the gain, decides which schedule applies.

The gap is large enough to plan around. Take a $20,000 gain for a single filer in the 22% marginal bracket: as a short-term gain it costs $4,400 of tax (22% of $20,000). As a long-term gain stacked on $80,000 of wages it costs $3,000 — 15% of $20,000 — because the wages already fill the 0% band. Same dollars, same year, $1,400 apart, decided by the sale date. That is why the holding period is the first question, before any rate table.

Two carve-outs sit outside the three rates. Gains on collectibles — art, coins, stamps — are taxed at up to 28%, and the unrecaptured part of a gain on depreciated real estate is taxed at up to 25%. Both still count as long-term gains for holding-period purposes; they just use a different ceiling. The examples below use the ordinary 0%/15%/20% schedule for stocks, funds and similar assets.

The 2026 rates: 0%, 15%, 20%

The IRS published the 2026 thresholds in Revenue Procedure 2025-32, section 4.03 (announced October 9, 2025, in IR-2025-103). The rates themselves never changed — 0%, 15% and 20% — only the dollar edges move with inflation each year. The thresholds apply to total taxable income, not to the size of the gain alone: your wages fill the bands first, and the gain is taxed at whatever rate applies where it lands.

Filing status0% up to15% up to20% above
Single$49,450$545,500Over $545,500
Married filing jointly$98,900$613,700Over $613,700
Head of household$66,200$579,600Over $579,600
Married filing separately$49,450$306,850Over $306,850

Against 2025 the edges moved up about 2%: the single 0% ceiling was $48,350 in 2025 and is $49,450 in 2026; the 15% ceiling moved from $533,400 to $545,500. Married filing jointly moved from $96,700 to $98,900 at the 0% edge and from $600,050 to $613,700 at the 15% edge. The figures apply to tax year 2026 — the return filed in early 2027.

Stacking: your gains sit on top of your wages

The rule that surprises people is stacking. The gain does not get its own fresh 0% band. Your ordinary income fills the bands first, and only the room left under $49,450 (single) is taxed at 0%. Two worked examples from the income tax calculator show both sides of the line.

Example one — inside the 0% band. A single filer earns $40,000 of wages. The 2026 standard deduction of $16,100 leaves $23,900 of taxable income, and the federal tax on it is $2,620 ($1,240 at 10% on the first $12,400, plus $1,380 at 12% on the remaining $11,500). Now add a $20,000 long-term gain: total taxable income becomes $43,900 — still under the $49,450 ceiling — so the entire gain is taxed at 0%. The tax bill stays $2,620. The gain is real income and costs nothing in federal tax.

Example two — past the 0% band. A single filer earns $80,000 of wages: taxable income $63,900, federal tax $8,770 (the calculator's own run: $1,240 + $4,560 + $2,970 across the 10%, 12% and 22% brackets). The wages alone already pass $49,450, so there is no 0% room left. Add the same $20,000 long-term gain and all of it is taxed at 15%: $3,000. Total tax $11,770 — $8,770 on the wages plus $3,000 on the gain.

Single filerWagesTaxable incomeTax on wagesGain taxTotal tax
$40,000 + $20,000 gain$40,000$43,900$2,620$0 (0%)$2,620
$80,000 + $20,000 gain$80,000$83,900$8,770$3,000 (15%)$11,770

The married example shows a split gain. A couple filing jointly earns $120,000: taxable income $87,800, federal tax $10,040. Add a $40,000 long-term gain and total taxable income is $127,800. The 0% band for joint filers runs to $98,900, so $11,100 of the gain is taxed at 0% and the remaining $28,900 at 15% — $4,335. Total tax $14,375. One gain, two rates, decided by where it lands.

The top of the scale: 20% and the 3.8% surtax

At the top, two more layers appear. A single filer earning $500,000 of wages has $483,900 of taxable income and a federal tax bill of $138,134.25 at a 35% marginal rate. Add a $100,000 long-term gain and total taxable income reaches $583,900. The 15% band has $61,600 of room left ($545,500 minus $483,900), taxed at 15% for $9,240; the remaining $38,400 crosses into the 20% band for $7,680. The gain's income tax is $16,920.

Then the net investment income tax (NIIT) applies. It is a flat 3.8% on the smaller of your net investment income or the amount by which modified adjusted gross income exceeds $200,000 ($250,000 for joint filers) — thresholds set by statute, not indexed for inflation. Here modified AGI is $600,000 and net investment income is the $100,000 gain, so the surtax is 3.8% of $100,000: $3,800. Total tax on the gain: $20,720 — an effective 20.72% on the gain, and a combined top rate of 23.8% (20% plus 3.8%) for gains above the thresholds.

The surtax is why the headline rate is not the whole story for high earners, and why it is not the story at all for most people: below $200,000 of modified AGI ($250,000 joint) it is zero. The $200,000 and $250,000 lines have not moved since the tax was introduced in 2013, so inflation quietly pulls more people over them each year.

Your home is different: the $250,000 exclusion

The biggest capital-gains break most people ever use has nothing to do with stocks. If you owned and lived in a home as your main residence for at least two of the last five years, you can exclude up to $250,000 of gain as a single filer — $500,000 for married couples filing jointly — from tax entirely. The exclusion is per sale, and you can generally use it once every two years.

The arithmetic is simple. Buy for $300,000, sell for $520,000: the gain is $220,000, and a single filer's $250,000 exclusion covers all of it — $0 of taxable gain. Buy for $300,000, sell for $900,000 as a married couple: the gain is $600,000, the $500,000 exclusion leaves $100,000 taxable, and that $100,000 is then taxed at the long-term rates above. Second homes, rental property and flips do not qualify — the home has to be your main residence, and the two years need not be continuous.

Rates and thresholds: IRS Revenue Procedure 2025-32, sections 4.01 and 4.03; home-sale exclusion under Internal Revenue Code section 121. Figures verified November 17, 2026. For education only — not tax advice.

What losses do: netting, then $3,000 a year

Losses are the mirror image. Capital losses first offset capital gains of the same kind — short-term losses against short-term gains, long-term against long-term — then any leftover loss offsets the other kind. If losses still remain, up to $3,000 a year ($1,500 if married filing separately) can offset ordinary income, and the rest carries forward to future years indefinitely.

The practical shape: a $20,000 long-term gain and a $20,000 long-term loss in the same year net to $0 of taxable gain. A $25,000 loss against a $20,000 gain leaves a $5,000 net loss — $3,000 against ordinary income this year, $2,000 carried forward. The wash-sale rule blocks the loss if you buy the same or a substantially identical security within 30 days before or after the sale, so the loss has to be a real exit, not a paper shuffle.

  • Net short-term against short-term and long-term against long-term first, then across kinds.
  • Up to $3,000 of net loss a year offsets ordinary income ($1,500 married filing separately).
  • Unused losses carry forward indefinitely — they do not expire.
  • The wash-sale rule disallows a loss repurchased within 30 days either side of the sale.

Running your own numbers

Start with the Income Tax Calculator: enter your wages and filing status and it returns your taxable income and federal tax on the ordinary side — the $40,000 example gives $23,900 and $2,620; the $80,000 example gives $63,900 and $8,770. Then stack your gain on top by hand: measure the room left under your 0% ceiling, tax the rest at 15% up to the second ceiling, and 20% above it. For the bracket mechanics behind the wage side, the companion guide How US Tax Brackets Actually Work walks the same 2026 tables, and Standard Deduction vs Itemizing covers the $16,100 versus itemized choice that sets taxable income in the first place.

Three checks before you trust any figure: the thresholds are for tax year 2026, the return filed in early 2027 — 2025 numbers are still floating around and are lower; the 0% band is measured on total taxable income, not on the gain alone; and state tax is a separate bill the federal rates never include.

Frequently asked questions

Do I pay capital gains tax if my income is low?

Possibly nothing at the federal level. Long-term gains stack on top of your other income, and in 2026 the 0% rate covers total taxable income up to $49,450 for single filers and $98,900 for married couples filing jointly — so a filer earning $40,000 of wages plus a $20,000 long-term gain can owe $0 of federal tax on the gain. State tax is separate, and the gain still counts toward the $200,000/$250,000 net investment income tax threshold. This is educational, not tax advice.

Is the 0% capital gains rate really 0%?

At the federal level, yes — gains inside the 0% band are taxed at 0%. But three things sit outside that sentence: most states tax the gain as ordinary income, the 3.8% net investment income tax can apply above $200,000 of modified AGI ($250,000 joint), and short-term gains never get the 0% rate at all — they are taxed at your ordinary marginal rate. The 0% band is a federal long-term-gains rule only. This is educational, not tax advice.

Does selling my house trigger capital gains tax?

Usually not, if it was your main home. The exclusion lets a single filer skip tax on up to $250,000 of gain ($500,000 joint) when you owned and lived in the home for at least two of the last five years. A $220,000 gain on a single filer's main home is fully excluded; a $600,000 gain for a married couple leaves $100,000 taxable. Second homes, rentals and flips do not get the exclusion. This is educational, not tax advice.

Run the numbers yourself

Federal tax on your income, with the 2026 brackets and standard deduction — run the wage side of the stacking example.

Income Tax Calculator

This guide is educational. Its figures are worked examples computed with the site's own calculators from the rules and tables they cite; they are not financial or tax advice for your situation. Confirm the final figure with your lender, tax authority or a qualified professional before making decisions.

Related guides