Capital Gains Tax Calculator

Estimate your 2026 federal tax when you sell stock, a home or another asset, using short-term and long-term rates, the 0%, 15% and 20% brackets, the 3.8% net investment income tax and the home-sale exclusion. For example, a single filer with $55,000 of other income who sells stock held more than a year for a $20,000 profit owes about $1,418 in federal tax, an effective rate of 7.1%.

Capital Gains Tax Calculator: inputs and results

What did you sell?

What you paid, plus commissions, improvements and reinvested dividends.

Commissions, agent fees, closing costs paid by the seller.

How long did you own it?

Count from the day after you acquired it through the day you sold it.

Wages and other ordinary income before deductions, not counting this sale. We subtract the standard deduction.

More options: state, losses and other income

Adds an estimate of state income tax on the gain.

Loss carryforward from earlier years plus other net capital losses realized this year.

Interest, dividends and rent. Taxed as ordinary income and counted for the 3.8% net investment income tax.

We use the larger of this or your standard deduction.

Estimated 2026 federal tax on this sale

$1,418

7.1% of your $20,000 gain, taxed at long-term rates

Total gain

$20,000

Taxable gain

$20,000

Rate on your gain

0% / 15%

Effective rate on the gain

7.1%

Net investment income tax (3.8%)

$0

After-tax proceeds

$48,583

From sale price to taxable gain

Sale price
$50,000
Amount realized
$50,000
Cost basis
−$30,000
Total gain
$20,000
Taxable gain
$20,000

Tax on the sale

Federal tax at long-term capital gains rates
$1,418
Net investment income tax (3.8%)
$0
Total tax on the sale
$1,418
After-tax proceeds (amount realized minus tax)
$48,583
After-tax profit
$18,583

After-tax proceeds are before repaying any mortgage or loan against the asset.

How much of your gain is taxed at 0%, 15% and 20%

0% rate$10,550 · 53%15% rate$9,450 · 47%20% rate$0 · 0%

Your other income leaves $38,900 of taxable income before the sale. The gain is added on top of it, so it fills the 0% bracket first (up to $49,450 of total taxable income for single), then the 15% bracket (up to $545,500), then 20%.

Short-term vs. long-term on this gain

Holding periodFederal taxEffective rateAfter-tax profit
Held more than 1 year (long-term)$1,4187.1%$18,583
Held 1 year or less (short-term)$3,25016.3%$16,750

No net investment income tax: your modified AGI with this sale is $75,000, which does not exceed the $200,000 threshold for single.

Estimate only. Not modeled: the alternative minimum tax, depreciation recapture and the 25% maximum rate on unrecaptured section 1250 gain, the 28% maximum rate on collectibles and qualified small business stock, other capital gains or losses this year (enter losses under “More options”), wash sales, installment sales, options, cryptocurrency specifics, partial home-sale exclusions, the surviving-spouse exclusion, and state-specific capital gains taxes.

Embed

How to use this capital gains tax calculator

  1. Choose what you sold: stocks and other assets, or a home. Home sales add a checkbox for the main-home exclusion.
  2. Enter the sale price and your cost basis. Basis is what you paid plus commissions, improvements and reinvested dividends. Add your selling costs, such as commissions or agent fees.
  3. Pick how long you owned it. More than one year is long-term; one year or less is short-term.
  4. Enter your other income for 2026 (wages and other ordinary income, before deductions and without this sale) and your filing status. The gain is stacked on top of it.
  5. Open “More options” to add a state, capital losses to offset, other investment income or itemized deductions.

Capital gains tax rates for 2026

Long-term gains are taxed at 0%, 15% or 20% depending on your total taxable income, which includes the gain itself. Short-term gains are taxed as ordinary income at your regular rate, 10% to 37%; see the 2026 tax brackets. The long-term thresholds for 2026 are below, and the 2026 capital gains rates page has more detail.

2026 long-term capital gains rates by taxable income
Filing status0% rate15% rate20% rate
SingleUp to $49,450$49,451 to $545,500Over $545,500
Married filing jointlyUp to $98,900$98,901 to $613,700Over $613,700
Married filing separatelyUp to $49,450$49,451 to $306,850Over $306,850
Head of householdUp to $66,200$66,201 to $579,600Over $579,600

Taxable income is measured after deductions. With the $16,100 standard deduction, a single filer could have about $65,550 of total income before any long-term gain is taxed at more than 0%.

How the capital gains tax is calculated

First, the gain is what you received minus what you put in:

G=P−S−B

Gain G = sale price P − selling costs S − cost basis B

G
gain (a negative number is a loss)
P
sale price
S
selling costs, such as commissions and agent fees
B
cost basis: what you paid plus purchase costs, improvements and reinvested dividends

Then the tax on the sale is the difference between your tax with the taxable part of the gain and your tax without it:

T=Tax(I+G)−Tax(I)

Tax on the sale T = Tax(other income I + taxable gain G) − Tax(other income I)

T
tax added by the sale, including any net investment income tax
I
your other income, after deductions
G
taxable gain, after the home-sale exclusion and any capital losses

Worked example

A single filer has $55,000 of other income. Taxable income before the sale is $55,000 − $16,100 standard deduction = $38,900. They sell stock held more than a year for $50,000 that cost $30,000, a gain of $20,000.

The 0% bracket ends at $49,450 of taxable income, so $49,450 − $38,900 = $10,550 of the gain is taxed at 0%. The remaining $9,450 is taxed at 15%: $9,450 × 15% = $1,417.50. Total federal tax on the sale: $1,417.50, or 7.1% of the gain. Modified AGI with the sale is $75,000, below the $200,000 net investment income tax threshold, so no 3.8% tax is added.

Short-term vs. long-term capital gains

The holding period decides which rates apply. An asset held more than one year produces a long-term gain; one year or less produces a short-term gain. The IRS counts from the day after you acquired the asset through the day you sold it. In its own example, property bought on January 31, 2024 and sold on January 29, 2025 is short-term, while the same property sold on February 6, 2025 is long-term.

Here is the same $20,000 gain, taxed both ways for a single filer at different levels of other income:

Federal tax on a $20,000 gain, held over a year vs. one year or less (single, 2026)
Other incomeLong-term taxShort-term taxExtra tax if short-term
$30,000$0$2,400$2,400
$55,000$1,418$3,250$1,833
$100,000$3,000$4,400$1,400
$200,000$3,760$5,730$1,970

Waiting a few weeks to pass the one-year mark can matter a lot, but weigh it against the risk that the price moves while you wait. If you are still choosing investments, the investment calculator shows how returns compound before tax.

How much tax on a $10,000, $50,000 or $100,000 gain?

Federal tax, including the net investment income tax where it applies, on a long-term gain at different levels of other income (standard deduction, no state tax). The percentage is the effective rate on the gain.

Federal tax on a long-term gain, single filer, 2026
Other income$10,000 gain$50,000 gain$100,000 gain
$30,000$0 (0%)$2,168 (4.3%)$9,668 (9.7%)
$60,000$668 (6.7%)$6,668 (13.3%)$14,168 (14.2%)
$100,000$1,500 (15%)$7,500 (15%)$15,000 (15%)
$200,000$1,880 (18.8%)$9,400 (18.8%)$18,800 (18.8%)
$400,000$1,880 (18.8%)$9,400 (18.8%)$18,800 (18.8%)
Federal tax on a long-term gain, married filing jointly, 2026
Other income$10,000 gain$50,000 gain$100,000 gain
$60,000$0 (0%)$0 (0%)$4,335 (4.3%)
$120,000$0 (0%)$5,835 (11.7%)$13,335 (13.3%)
$250,000$1,880 (18.8%)$9,400 (18.8%)$18,800 (18.8%)
$500,000$1,880 (18.8%)$9,400 (18.8%)$18,800 (18.8%)
$800,000$2,380 (23.8%)$11,900 (23.8%)$23,800 (23.8%)

The 3.8% net investment income tax

High earners can owe an extra 3.8% tax on investment income, including capital gains. It applies to the smaller of your net investment income or the amount by which your modified adjusted gross income (MAGI) is over the threshold for your filing status. Gain on the sale of a main home counts only to the extent it is not excluded.

Net investment income tax thresholds
Filing statusMAGI threshold
Single$200,000
Married filing jointly$250,000
Married filing separately$125,000
Head of household$200,000

For a single filer with $600,000 of other income and a $100,000 long-term gain, the calculator shows $20,000 of tax at the 20% rate plus $3,800 of net investment income tax: $23,800 in all, or 23.8% of the gain.

Capital gains tax on selling your home

If you sell your main home, you may be able to exclude part of the gain from income. According to the IRS, you can exclude up to $250,000 of gain, or up to $500,000 if you file a joint return, when you meet these tests:

  • Ownership: you owned the home for at least 24 months of the last 5 years before the sale.
  • Use: you lived in it as your main home for at least 24 months of the last 5 years. For the joint limit, both spouses must meet the use test, and one of them must meet the ownership test.
  • Look-back: you have not excluded gain from another home sale in the 2 years before this one (on a joint return, this applies to each spouse).
Home-sale exclusion limits
Filing statusMaximum exclusion
Single, head of household or married filing separately$250,000
Married filing jointly$500,000

Your gain is the sale price minus your selling costs minus your adjusted basis, which is what you paid plus improvements. On the example above, a married couple sells for $900,000 with $54,000 of selling costs and a $300,000 basis. The $546,000 gain, less the $500,000 exclusion, leaves $46,000 to tax; on a joint return with $120,000 of other income, that costs about $5,235. A single seller with the same numbers has $296,000 of taxable gain and owes about $52,608.

Two limits to know. A loss on the sale of your own home is not deductible. And the exclusion does not cover depreciation you claimed, or could have claimed, for a home office or rental use after May 6, 1997, or some gain tied to periods after 2008 when the home was not your main home; the IRS also allows a partial exclusion in some cases, such as a job change, health reasons or unforeseen events. This calculator does not model those situations.

Capital losses, the $3,000 limit and the wash-sale rule

Capital losses first offset capital gains. If losses are larger, you can deduct up to $3,000 of the excess against other income each year ($1,500 if married filing separately), and the unused part carries forward to later years, keeping its long-term or short-term character. Enter carried-over losses under “Capital losses to offset” in the calculator. The actual IRS carryover worksheet also looks at your taxable income, so treat the carryforward shown here as an estimate.

The wash-sale rule stops you from claiming a loss when you sell stock or securities and, within 30 days before or after the sale, buy substantially identical stock or securities, acquire a contract or option to buy them, or buy them for your IRA or Roth IRA. A purchase by your spouse or by a corporation you control counts too. The disallowed loss is generally added to the cost of the new shares instead.

How to reduce capital gains tax

  • Hold longer than a year. On the example gain, that turns $3,250 of tax into $1,418.
  • Harvest losses. Sell losing positions to offset gains, and watch the 30-day wash-sale window before you buy the same investment back.
  • Count every cost in your basis. Commissions, reinvested dividends and (for a home) improvements raise your basis and shrink the gain; selling costs reduce the amount you realize.
  • Use the 0% bracket. In a year with lower income, part of a long-term gain can be taxed at 0%. With $55,000 of other income, a single filer has room for $10,550 of gain at 0%.
  • Use the home-sale exclusion. Live in the home long enough to meet the ownership and use tests before you sell.

To see your whole return, including wages, credits and deductions, use the income tax calculator.

Capital gains on inherited property

The basis of property you inherit is generally its fair market value on the date of the owner’s death (or on the alternate valuation date, if the estate elects it). So the taxable gain when you sell is usually only the growth since then. The IRS also treats gain or loss on inherited property you sell as long-term, no matter how long you held it. To model an inherited sale, enter the date-of-death value as your cost basis and choose “More than 1 year.”

What this calculator does not model

  • The alternative minimum tax, and credits or deductions other than the standard or itemized deduction you enter.
  • Collectibles (a 28% maximum rate), qualified small business stock (28%) and the 25% maximum rate on unrecaptured section 1250 gain from depreciated real estate.
  • Depreciation recapture, installment sales, options, cryptocurrency-specific rules and the wash-sale adjustment itself.
  • Partial home-sale exclusions, the surviving-spouse exclusion and nonqualified use of a home.
  • Other capital gains you realize the same year (only losses can be entered), and children, age or earned income credits.
  • State capital gains rules. The optional state figure taxes the gain like other income under the state’s brackets; some states tax gains differently or separately. See the state income tax rates for 2026.

For a full picture of your bracket, see the 2026 tax brackets and the 2026 standard deduction.

Frequently asked questions

What is the capital gains tax rate for 2026?

For assets held more than one year, the 2026 federal rates are 0%, 15% and 20%, based on your taxable income. A single filer pays 0% up to $49,450, 15% up to $545,500 and 20% above that; married couples filing jointly use $98,900 and $613,700. Assets held one year or less are taxed at ordinary rates, 10% to 37%.

How much tax will I pay when I sell stock?

It depends on how long you held it and on your other income. In our example, a single filer with $55,000 of other income sells stock held over a year for a $20,000 gain and owes about $1,418, or 7.1%, because $10,550 of the gain fits in the 0% bracket. Sold within a year, the same gain would cost $3,250.

How much tax will I pay when I sell my house?

Possibly none. If you owned and lived in the home as your main home for at least 2 of the last 5 years, you can exclude up to $250,000 of gain, or $500,000 on a joint return. In our example, a couple selling with a $546,000 gain has $46,000 left to tax and owes about $5,235. A single seller with the same numbers would owe about $52,608.

What is the difference between short-term and long-term capital gains?

The difference is how long you held the asset. Short-term gains come from assets held one year or less and are taxed like ordinary income. Long-term gains come from assets held more than one year and use the lower 0%, 15% and 20% rates. The IRS counts from the day after you acquired the asset through the day you sold it. On our example gain, that is $3,250 versus $1,418 in federal tax.

Do I owe capital gains tax if I sell at a loss?

No. A loss means no capital gains tax on that sale, and it can offset your other gains. If your losses exceed your gains, you can deduct up to $3,000 of the excess against other income each year ($1,500 if married filing separately) and carry the rest forward. In our example, a $10,000 loss deducts $3,000 now and carries $7,000 forward. Losses on personal-use property, such as your home or car, are not deductible.

What is the net investment income tax on capital gains?

It is an extra 3.8% tax on the smaller of your net investment income or the amount your modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). A single filer with $600,000 of other income and a $100,000 gain owes $3,800 of it on top of $20,000 of capital gains tax.

How can I reduce capital gains tax?

Hold assets more than a year, offset gains with losses, add every eligible cost to your basis, sell in a lower-income year when part of the gain can be taxed at 0%, and use the home-sale exclusion if you qualify. If you sell a stock at a loss and buy the same or substantially identical stock within 30 days before or after, the wash-sale rule disallows the loss for now.

Is inherited property taxed when I sell it?

Only on growth after the owner’s death, in most cases. The basis of inherited property is generally its fair market value on the date of death, so gain is measured from that value rather than from what the person originally paid. The IRS also treats gain or loss on inherited property as long-term regardless of how long you held it. Special elections, such as alternate valuation, can change the basis, so check the estate’s paperwork.

Sources

  1. Revenue Procedure 2025-32: 2026 inflation-adjusted tax items (capital gains rate thresholds) — Internal Revenue Service
  2. IRS releases tax inflation adjustments for tax year 2026 (IR-2025-103): brackets and standard deduction — Internal Revenue Service
  3. Topic no. 409, Capital gains and losses — Internal Revenue Service
  4. Topic no. 559, Net investment income tax — Internal Revenue Service
  5. Publication 550, Investment Income and Expenses — Internal Revenue Service
  6. Publication 523, Selling Your Home — Internal Revenue Service

This calculator provides estimates for educational purposes only. Results depend on the information you enter and on assumptions described on this page; actual loan terms, taxes and returns will vary. It is not financial, tax, legal or investment advice. See our methodology and terms of use.