Capital Gains Tax Calculator

A long-term sale at $80,000.00 on a $50,000.00 cost with $95,000.00 of 2026 Single pay and a 5% state rate owes $6,000.00 in tax. You keep $74,000.00.

Last reviewed

Capital gains tax and after-tax proceeds

Total Capital Gains Tax

$6,000.00

After-Tax Sale Proceeds

$74,000.00

On a $30,000.00 long-term gain in 2026 (Single), total tax is $6,000.00 (20.00% of the gain). You keep $74,000.00 after tax.

Above $78,900.00 of base taxable income, you owe $4,500.00 of federal tax (saving $2,164.00 vs. $6,664.00 short-term), $0.00 of NIIT, and $1,500.00 of state tax (5.00%).

This model covers Schedule D, Form 1040 worksheets, Form 8960 NIIT, and a flat state rate. Wash sales, home exclusions, and AMT are outside the form.

Want to see how this sale fits into your full tax return? Open your numbers in the federal income tax calculator, with your other income plus the gain as adjusted gross income.

Asset sale, holding period, and income

Filing status & sale amounts
Sets 2025 (Rev. Proc. 2024-40), 2026 (Rev. Proc. 2025-32) and 2027 (Rev. Proc. 2026-35) capital gains thresholds, ordinary brackets, and standard deductions.
Your Form 1040 filing status across all 5 options; sets your deduction, 0%/15%/20% breakpoints, NIIT threshold, and capital loss limit.
What you paid for the asset plus capital improvements and purchase commissions (Form 8949 column (e)), from $0 to $100,000,000.
Gross sale price minus brokerage commissions, transfer taxes, and selling costs (Form 8949 column (d)), from $0 to $100,000,000.
Under 26 U.S.C. § 1222, hold more than 1 year (at least 1 year and 1 day) for long-term rates; 1 year or less is taxed as ordinary income.
Regular assets use the 0% / 15% / 20% brackets. For the 25% and 28% options, enter in the gain only the unrecaptured depreciation (25%) or only the taxable, non-excluded part of the gain (28%); this page does not split a sale or compute the section 1202 exclusion, so the rest needs a second run.
Other income, deductions & state rate
Wages, salary, interest, business profit, and other adjusted gross income for the year, before subtracting your standard or itemized deduction.
2026 standard deduction: $16,100 single or separate, $32,200 joint or surviving spouse, $24,150 head of household.
Your state's tax rate on capital gains, from 0% to 15%. Enter 0 if your state does not tax the gain.
Worked sheet for Your capital gains tax worksheet: how the total capital gains tax of $6,000.00 is worked out, in 5 steps.Your capital gains tax worksheetRealized gain (or loss) = sale proceeds− adjusted basisTaxable income with sale= max(0, other income + gain − deduction)Total capital gains tax = federal CGT + 3.8% NIIT+ state taxRealized capital gain = $80,000.00 − $50,000.00= $30,000.00Taxable income without sale= max($0.00, $95,000.00 − $16,100.00)= $78,900.00Taxable income with sale= max($0.00, $95,000.00 + $30,000.00− $16,100.00) = $108,900.00Federal capital gains tax = $4,500.00 + $0.00= $4,500.00Total capital gains tax = $4,500.00 + $0.00+ $1,500.00 =$6,000.00
  1. Realized capital gain = $80,000.00 − $50,000.00 = $30,000.00
  2. Taxable income without sale = max($0.00, $95,000.00 − $16,100.00) = $78,900.00
  3. Taxable income with sale = max($0.00, $95,000.00 + $30,000.00 − $16,100.00) = $108,900.00
  4. Federal capital gains tax = $4,500.00 + $0.00 = $4,500.00
  5. Total capital gains tax = $4,500.00 + $0.00 + $1,500.00 = $6,000.00
How $6,000.00 of total capital gains tax ($74,000.00 after-tax proceeds) is worked out.

Federal capital gains tax by bracket

Federal capital gains tax by bracket, tax bracket rate 0.00% to 20.00%: the federal tax in each bracket starts and ends at $0.00 and runs from $0.00 to $4,500.00.$0$2,000$4,000$6,0000.00%15.00%20.00%Tax bracket rateFederal tax in bracketFederal capital gains tax by bracket, tax bracket rate 0.00% to 20.00%: the federal tax in each bracket starts and ends at $0.00 and runs from $0.00 to $4,500.00.$0$2,000$4,000$6,0000.00%15.00%20.00%Tax bracket rateFederal tax in bracket
All $4,500.00 of federal capital gains tax comes from $30,000.00 in the 15.00% tier.

Effective and marginal total tax rates by capital gain

Effective and marginal total tax rates by capital gain, realized capital gain $0.00 to $750,000.00: the effective total tax rate starts at 0.00%, runs from 0.00% to 25.16% and ends at 25.16% and the marginal total tax rate starts at 20.00%, runs from 20.00% to 28.80% and ends at 28.80%.0%10%20%30%$0.00$200,000.00$400,000.00$600,000.00$750,000.00Realized capital gainEffective total rateMarginal total rateEffective and marginal total tax rates by capital gain, realized capital gain $0.00 to $750,000.00: the effective total tax rate starts at 0.00%, runs from 0.00% to 25.16% and ends at 25.16% and the marginal total tax rate starts at 20.00%, runs from 20.00% to 28.80% and ends at 28.80%.0%10%20%30%$0.00$250,000.00$500,000.00$750,000.00Realized capital gainEffective total rateMarginal total rate
At your $30,000.00 gain, both the combined effective rate and the combined marginal rate are 20.00%.

Capital gains tax across sale prices

Across the 9 preset sale prices ($40,000.00 to $650,000.00), total tax moves from $0.00 to $145,480.00 and after-tax proceeds move from $40,000.00 to $504,520.00.

Sale priceCapital gain (or loss)Federal taxTotal taxAfter-tax proceeds
$40,000.00−$10,000.00$0.00$0.00$40,000.00
$50,000.00$0.00$0.00$0.00$50,000.00
$65,000.00$15,000.00$2,250.00$3,000.00$62,000.00
$80,000.00 (closest to your input)$30,000.00$4,500.00$6,000.00$74,000.00
$110,000.00$60,000.00$9,000.00$12,000.00$98,000.00
$150,000.00$100,000.00$15,000.00$20,000.00$130,000.00
$250,000.00$200,000.00$30,000.00$43,610.00$206,390.00
$400,000.00$350,000.00$52,500.00$79,310.00$320,690.00
$650,000.00$600,000.00$96,670.00$145,480.00$504,520.00

Total capital gains tax (federal + 3.8% NIIT + state), by sale price (rows) and other income (columns).

Sale Price (Net Proceeds) by other income (Before deductions)$30,000$95,000$220,000$560,000
$40,000$0.00$0.00$0.00$0.00
$50,000$0.00$0.00$0.00$0.00
$65,000$750.00$3,000.00$3,570.00$4,240.00
$80,000 (closest to your input)$1,500.00$6,000.00$7,140.00$8,560.00
$110,000$6,667.50$12,000.00$14,280.00$17,200.00
$150,000$14,667.50$20,000.00$23,800.00$28,720.00
$250,000$35,807.50$43,610.00$47,600.00$57,520.00
$400,000$71,507.50$79,310.00$83,720.00$100,720.00
$650,000$134,427.50$145,480.00$155,720.00$172,720.00

How ordinary income stacks your capital gain into higher brackets

As other income rises from $0.00 to $600,000.00 across the 9 rows, total capital gains tax moves from $1,500.00 to $8,640.00 (spanning $1,500.00 to $8,640.00).

Other incomeOrdinary taxableFederal CGT3.8% NIITTotal CGTEffective rate
$0.00$0.00$0.00$0.00$1,500.005.00%
$25,000.00$8,900.00$0.00$0.00$1,500.005.00%
$50,000.00$33,900.00$2,167.50$0.00$3,667.5012.23%
$75,000.00$58,900.00$4,500.00$0.00$6,000.0020.00%
$95,000.00 (closest to your input)$78,900.00$4,500.00$0.00$6,000.0020.00%
$150,000.00$133,900.00$4,500.00$0.00$6,000.0020.00%
$200,000.00$183,900.00$4,500.00$1,140.00$7,140.0023.80%
$300,000.00$283,900.00$4,500.00$1,140.00$7,140.0023.80%
$600,000.00$583,900.00$6,000.00$1,140.00$8,640.0028.80%

Capital gain stacked across tax brackets

Bracket rateOverUp toGain in bracketFederal tax
0.00%$0.00$49,450.00$0.00$0.00
15.00%$49,450.00$545,500.00$30,000.00$4,500.00
20.00%$545,500.00No ceiling$0.00$0.00

Ordinary taxable income of $78,900.00 fills the lower bracket space first, stacking $0.00 at 0.00%, $30,000.00 at 15.00%, and $0.00 at 20.00% ($4,500.00 total federal tax).

Effective and marginal total tax rates by capital gain

Show the 11-point capital-gain, effective-rate, and marginal-rate schedule
Capital gainTaxable with saleTotal taxEffective rateMarginal rate

Across the 11 sampled capital-gain levels from $0.00 to $750,000.00, the combined effective tax rate spans 0.00% to 25.16% (25.16% at $750,000.00).

All 5 filing statuses compared on this sale

Filing status0% ceilingFederal tax3.8% NIITTotal taxAfter-tax proceeds
Single$49,450.00$4,500.00$0.00$6,000.00$74,000.00
Married filing jointly$98,900.00$0.00$0.00$1,500.00$78,500.00
Married filing separately$49,450.00$4,500.00$0.00$6,000.00$74,000.00
Head of household$66,200.00$4,500.00$0.00$6,000.00$74,000.00
Qualifying surviving spouse$98,900.00$0.00$0.00$1,500.00$78,500.00

In 2026, Married filing jointly and Qualifying surviving spouse tie for the lowest total tax at $1,500.00, while Single, Married filing separately, and Head of household tie for the highest at $6,000.00.

How federal and state capital gains tax works

When you sell stock, funds, crypto, or land for more than your cost basis, the profit is a capital gain. Under 26 U.S.C. § 1222, your holding time sets the tax rules. As IRS Topic No. 409 states, "Generally, if you hold the asset for more than one year before you dispose of it, your capital gain or loss is long-term." If you hold it 1 year or less, your gain or loss is short-term. You start counting on the day after you buy the asset, and the day you sell counts as your last day. For market trades, IRS Publication 550 states that "your holding period begins the day after the trade date you bought the securities, and ends on the trade date you sold them." Check your exact settlement day in the stock trade settlement date calculator.

Short-term capital gains get no lower tax rate. They sit on top of your regular taxable income and pay the seven ordinary rates from 10% to 37% under 26 U.S.C. § 1(j). First, you subtract your deduction from your other income. In 2026 (IRS Revenue Procedure 2025-32 § 4.14), the standard deduction is $16,100 for Single or Married Filing Separately. It is $32,200 for Married Filing Jointly or Qualifying Surviving Spouse, and $24,150 for Head of Household. In 2025 (26 U.S.C. § 63(c)(7); Revenue Procedure 2025-32 § 3.01), those amounts are $15,750, $31,500, and $23,625. See how wage income fills the seven brackets in the federal income tax calculator.

Regular long-term capital gains use three lower rates under 26 U.S.C. § 1(h): 0%, 15%, and 20%. Your ordinary taxable income (other income minus your deduction) fills the bottom of the tax scale first. Your long-term gain then stacks on top of that base on the Form 1040 worksheet. For 2026 (Revenue Procedure 2025-32 § 4.03), the zero-rate ceiling is $49,450 for Single or Separate filers. It covers up to $98,900 for Joint or Surviving Spouse filers, and $66,200 for Head of Household. Next, the middle tier runs up to $545,500 Single, $613,700 Joint or Surviving Spouse, $306,850 Separate, and $579,600 Head of Household. Gains above those ceilings pay the top rate.

For 2025 (Revenue Procedure 2024-40 § 2.03), the zero-rate ceiling is $48,350 Single or Separate, $96,700 Joint or Surviving Spouse, and $64,750 Head of Household. The 2025 middle-tier ceiling is $533,400 Single, $600,050 Joint or Surviving Spouse, $300,000 Separate, and $566,700 Head of Household. Because wages fill the bottom space first, a high salary can push your whole gain out of the zero-tax band. That happens even when the gain itself is small. Dividend investors can check the more-than-60-days-in-121-days holding test under 26 U.S.C. § 1(h)(11) for those three preferential tiers in the qualified dividend holding period calculator.

How 25% unrecaptured section 1250 and 28% collectibles rates work

Not every long-term asset uses the three standard long-term tiers. Under 26 U.S.C. § 1(h), two special long-term groups have higher rate caps on the IRS Schedule D Tax Worksheet. First, as IRS Topic No. 409 notes, "The portion of any unrecaptured section 1250 gain from selling section 1250 real property is taxed at a maximum 25% rate." When you sell a rental building at a gain, prior write-offs are taxed up to this 25% cap. Any price gain above your original cost still uses the standard long-term tiers. Test a full building sale with both layers in the rental property sale tax calculator.

Second, IRS Topic No. 409 states that "Net capital gains from selling collectibles (such as coins or art) are taxed at a maximum 28% rate." That 28% cap also applies to the taxable part of section 1202 small business stock gain. Note that both special rates are caps, not flat taxes. On lines 19 to 47 of the Schedule D Tax Worksheet, any slice of gain inside the 10% through 24% ordinary brackets pays those lower rates. In 2026, the 24% bracket ends at $201,775 Single or Separate, $403,550 Joint or Surviving Spouse, and $201,750 Head of Household ($197,300 and $394,600 in 2025). Only the gain stacked above the 24% ceiling is capped at the special rate instead of paying 32%, 35%, or 37%.

Capital loss limits ($3,000 / $1,500) and the 3.8% Net Investment Income Tax

High earners also face the 3.8% Net Investment Income Tax (NIIT) on Form 8960. Under 26 U.S.C. § 1411(a)(1), you pay 3.8% on the smaller of your net investment income or your modified AGI above a fixed line. That line is $200,000 for Single or Head of Household, $250,000 for Joint or Surviving Spouse, and $125,000 for Separate filers. As the IRS NIIT Q&A warns, "Taxpayers should be aware that these threshold amounts are not indexed for inflation." Adding 3.8% to the 20% top bracket brings the top federal rate on long-term gains to 23.8%. Test multi-asset gain in the net investment income tax calculator.

When your sale price is below your cost, you have a capital loss. Under 26 U.S.C. § 1211(b), losses offset your capital gains dollar for dollar first. Up to $3,000 of left-over net loss ($1,500 if Married Filing Separately) then cuts your regular income on your return. Under 26 U.S.C. § 1212(b), any unused loss above that cap carries forward to future years with no time limit. Track multi-year loss buckets in the capital loss carryover calculator. You can also check the 30-day buyback rule in the wash sale calculator.

Capital gains stacking and NIIT formula

Realized gain (or loss) = sale proceeds − adjusted basis
Taxable income without sale = max(0, other income − deduction)
Taxable income with sale = max(0, other income + max(0, gain) − deduction)
Regular LTCG stacks above ordinary taxable income across 0% / 15% / 20% (or 25% / 28% Schedule D caps)
NIIT = 3.8% × min(max(0, gain), max(0, MAGI − NIIT threshold))
Total capital gains tax = federal CGT + 3.8% NIIT + round(max(0, gain) × state rate)

Worked 2026 capital gains tax examples

Default 15%-tier sale ($50,000.00 cost, $80,000.00 sale, $95,000.00 other pay, 5% state rate): Your long-term gain is $80,000.00 − $50,000.00 = $30,000.00. Taking the $16,100 standard deduction from $95,000.00 leaves $78,900.00 of ordinary taxable income, above the zero-rate band. All $30,000.00 sits in the 15% tier ($78,900.00 to $108,900.00) for $4,500.00 of federal tax. State tax adds $1,500.00, so total tax is $6,000.00 (20.00% of the gain) and net cash is $74,000.00. Sold in 1 year or less, that $30,000.00 short-term gain spans the 22% bracket ($26,800.00 up to $105,700.00 = $5,896.00) and 24% bracket ($3,200.00 above $105,700.00 = $768.00) for $6,664.00 of federal tax. Holding past 1 year saves $2,164.00.

Straddling the zero-rate and 15% brackets ($30,000.00 cost, $70,000.00 sale, $45,000.00 other pay, no state tax): Your long-term gain is $40,000.00 and ordinary taxable income is $28,900.00. Up to the $49,450 Single ceiling, your first $20,550.00 of gain pays no federal tax. The remaining $19,450.00 ($40,000.00 − $20,550.00) pays 15% for $2,917.50 of total tax. That is an effective rate of 7.29% on the $40,000.00 gain.

NIIT threshold straddle (modeled on IRS NIIT Q&A #20, with a $90,000.00 gain: $180,000.00 wages, no state tax): Total MAGI is $180,000.00 + $90,000.00 = $270,000.00. That beats the Single line by $70,000.00. Since $70,000.00 is less than the $90,000.00 gain, the 3.8% NIIT applies only to $70,000.00. That adds $2,660.00 of NIIT to the $13,500.00 regular long-term tax, for $16,160.00 of federal tax including NIIT.

Net capital loss cap and carryforward ($50,000.00 cost, $35,000.00 sale, $95,000.00 other pay): Your net capital loss is $15,000.00, so capital gains tax is $0.00. On Schedule D, $3,000 cuts your ordinary income to $75,900.00. That saves $660.00 of federal tax this year, while $12,000.00 carries forward to future tax years.

Scope, limits, and assumptions

  • Models one asset sale or net Schedule D position for tax years 2025 (Rev. Proc. 2024-40), 2026 (Rev. Proc. 2025-32) and 2027 (Rev. Proc. 2026-35) across all 5 filing statuses. Standard Deduction uses the basic standard deduction for your status. If you claim age-65 or blind boxes under 26 U.S.C. § 63(f) ($2,050 unmarried or $1,650 married per box in 2026), switch to Itemized and enter your combined deduction.
  • If you have multiple trades on Form 8949, Schedule D Part I and Part II net short-term and long-term buckets first. Then the return applies the tax worksheets. Your other income stands in for modified AGI before the sale, while foreign pay exclusions under 26 U.S.C. § 911 add back to MAGI.
  • The capped-rate options tax the whole gain you enter at their cap. A building sale with $400,000 of gain, of which $100,000 is depreciation, needs two runs: enter only the $100,000 of depreciation under the capped option, then the rest as a regular gain. The page does not compute the exclusion for qualified small business stock either, so enter only the part that stays taxable. Use the rental property sale tax calculator and the QSBS exclusion calculator for those splits.
  • Prior-year capital loss carryovers are not an input. Net them against this sale first, as Schedule D does, and enter the net result. The capital loss carryover calculator tracks them.
  • Federal tax is figured from the rate schedules at your exact taxable income. A filed Form 1040 with taxable income under $100,000 uses the Tax Table, which taxes each $50 row at its midpoint, so the return can differ from this page by a few dollars.
  • Home sale exclusions up to $250,000 ($500,000 joint) under 26 U.S.C. § 121 are outside this form. Test a home sale in the home sale exclusion calculator or a property swap in the 1031 exchange calculator.
  • State tax is a flat rate on positive net gain from 0% to 15% and $0.00 on net losses. State exemptions or surtaxes are in the Washington capital gains tax calculator.

These figures are estimates for learning and planning, not financial, tax, legal or investment advice. Terms of use.

What to do with your estimate

Check your trade date before selling near the 1-year mark. A sale on the first anniversary of your purchase date is still short-term; a sale on the next day or later is long-term. In the default example, that one extra day moves the gain out of the short-term brackets ($6,664.00 federal tax) and saves $2,164.00.

Fill unused zero-bracket space in low-income years. In 2026, a joint couple taking the standard deduction can reach $131,100 of total AGI ($32,200 deduction plus $98,900 ceiling). They owe $0.00 of federal capital gains tax.

Set aside cash from your After-Tax Proceeds and pay quarterly tax when needed. Brokerage sales on Form 1099-B have no payroll withholding. Test your payments in the quarterly estimated tax calculator if you will owe $1,000 or more under 26 U.S.C. § 6654(e)(1).

Capital gains tax questions

How much long-term gain is taxed at 0%?

You pay 0% when your total taxable income after deductions stays inside your status ceiling. On a 2026 Single return taking the standard deduction, your other income and long-term gain can reach $65,550 ($49,450 ceiling plus the $16,100 deduction). Below that line, your long-term gain owes no federal tax. The other filing statuses and 2025 are in the thresholds above.

Do capital gains push my salary into a higher ordinary tax bracket?

No. On the Form 1040 worksheet, your ordinary taxable income (wages and interest minus deductions) sits at the bottom of the scale. It is taxed first at normal rates. A $500,000.00 long-term stock gain stacks on top of that base and can push the gain itself into the 20% tier and the 3.8% surtax. However, it never raises the bracket rate on your wages.

How is the 1-year holding period counted for long-term capital gains?

Under 26 U.S.C. § 1222(3), a long-term gain requires holding the asset for "more than 1 year"—at least 1 year and 1 day. Your holding clock starts on the day after your purchase date, and the sale date is your final day. If you buy stock on May 10, 2025, holding through May 10, 2026 is 1 year (short-term). Selling on or after May 11, 2026 is long-term.

When does the 3.8% Net Investment Income Tax (NIIT) apply to a sale?

Under 26 U.S.C. § 1411, the surtax applies to the smaller of your net investment income or your modified AGI above your status threshold. Take a joint couple with $240,000.00 of wages and a $50,000.00 gain ($290,000.00 MAGI). Only the $40,000.00 above their line owes the surtax, which adds $1,520.00.

How much can I deduct if I sell at a net capital loss?

Capital losses first offset your capital gains for the year dollar for dollar with no limit. Any left-over net loss cuts your regular income up to the annual cap on Schedule D line 21. On a Separate return with a $6,000.00 net loss, you deduct $1,500 this year and carry the rest forward to future years.

Why is my collectibles or section 1250 real-estate gain taxed below 28% or 25%?

The 28% collectibles rate and 25% real-estate rate act as ceilings on the Schedule D Tax Worksheet, not flat taxes. Any slice inside the lower ordinary brackets pays those lower rates. A Single filer with $45,000.00 of other pay and a $30,000.00 gain on gold coins pays $4,450.00 (14.83% across the 12% and 22% tiers) rather than a flat 28%.

How does this page treat state capital gains tax?

It applies the one flat rate you enter, from 0% to 15%, to the whole positive gain and charges nothing on a loss. Each state sets its own tax, and some tax gains at a different rate, exclude part of a gain, or charge a separate tax. Look up your state's rate and enter it. For Washington's separate excise tax, use the Washington capital gains tax calculator.

Sources

Embed this calculator

Paste this code into your page. The credit line under the frame is optional.