BedrockCalculator
Verified Primary-Source MathematicsVerified by Aapt Dubey, MBA (Marketing & Finance) 3 primary sourcesLast updated September 14, 2026

Capital Gains Tax Calculator

Quick Answer: Selling an asset with a $50,000 cost basis for $120,000 after holding it long-term, with $80,000 of other taxable income, produces a $70,000 gain taxed at 15%, for $10,500 in federal capital gains tax and $109,500 in net proceeds.

Assumptions

Loading
$
$
$

Preset scenarios

Total Capital Gains Tax Due
$10,500.00

Every period in the schedule below reconciles to the exact penny.

Net Realized Gain
$70,000.00
Net Proceeds After Tax
$109,500.00
Effective Tax Rate (%)
15.00%

Net Proceeds vs Capital Gains Tax

Scaled Net GainTax at Effective RateNet Gain After Tax
10 periods, peak $140,000

Capital Gains Tax Schedule

Showing 10 rows.

Gain Step (1/5 of Net Gain)Scaled Net GainTax at Effective RateNet Gain After Tax
1$14,000.00$2,100.00$11,900.00
2$28,000.00$4,200.00$23,800.00
3$42,000.00$6,300.00$35,700.00
4$56,000.00$8,400.00$47,600.00
5$70,000.00$10,500.00$59,500.00
6$84,000.00$12,600.00$71,400.00
7$98,000.00$14,700.00$83,300.00
8$112,000.00$16,800.00$95,200.00
9$126,000.00$18,900.00$107,100.00
10$140,000.00$21,000.00$119,000.00
Net Proceeds vs Capital Gains Tax: Scaled Net Gain, Tax at Effective Rate, Net Gain After Tax across 10 periods for this calculator's default example, peaking at $140,000.00.
Drawn from this calculator's own default inputs, where Total Capital Gains Tax Due is $10,500.00. Change the inputs above to see your own figures.
Quick Answer: Selling an asset with a $50,000 cost basis for $120,000 after holding it long-term, with $80,000 of other taxable income, produces a $70,000 gain taxed at 15%, for $10,500 in federal capital gains tax and $109,500 in net proceeds.

Overview

Capital gains tax applies to the profit from selling an asset, not to the full sale price. This calculator computes that profit (sale price minus cost basis) and then taxes it according to two variables that matter more than almost anything else in capital gains planning: how long you held the asset and how much other taxable income you already have.

Assets held longer than one year qualify for long-term capital gains treatment, which uses preferential rates of 0%, 15%, or 20% depending on your total taxable income (your other income plus the gain itself), and a gain can straddle more than one of those brackets. Assets held one year or less are short-term gains, taxed as ordinary income: this calculator stacks the gain on top of your other taxable income and runs it through the real 2026 seven-bracket ordinary schedule, computing the incremental tax the gain itself adds rather than applying one flat estimated rate.

On top of the base capital gains rate, this calculator layers the 3.8% Net Investment Income Tax (NIIT) whenever total taxable income exceeds $200,000, since NIIT is a Medicare-linked surtax on investment income for higher earners, separate from and additional to the base capital gains rate. The two outputs that matter most, net realized gain and net proceeds after tax, tell you both what you profited on paper and what actually lands in your account after the IRS takes its share.

How This Is Calculated

The net gain is simply proceeds minus basis. That gain is then added to other taxable income to determine which capital gains bracket applies, because capital gains rates are based on total taxable income, not on the gain in isolation.

Net Gain=Sale Price−Cost Basis\text{Net Gain} = \text{Sale Price} - \text{Cost Basis}
Total Taxable Income=Other Taxable Income+Net Gain\text{Total Taxable Income} = \text{Other Taxable Income} + \text{Net Gain}
Total Tax=Net Gain×(Capital Gains Rate+NIIT Rate)\text{Total Tax} = \text{Net Gain} \times \left(\text{Capital Gains Rate} + \text{NIIT Rate}\right)

Long-Term Rate Selection (as applied by this calculator, single filer, 2026)

Total Taxable IncomeLong-Term Rate
Below $49,4500%
$49,450-$545,50015%
Above $545,50020%

Married filing jointly uses higher thresholds ($98,900 and $613,700). If a gain straddles a threshold, only the portion above it is taxed at the higher rate: the whole gain is not bumped to the top rate just because the total crosses the line.

Short-Term Rate

Short-term gains (assets held one year or less) are ordinary income. This calculator computes the tax on your other income alone, then the tax on your other income plus the gain, and the difference is the tax attributable to the gain, the real marginal-stacking approach the IRS uses, not a flat estimated rate.

NIIT Overlay

The threshold depends on filing status: $200,000 for a single filer and $250,000 for married filing jointly. Neither figure is indexed for inflation.

The 3.8% does not apply to the whole gain, and it does not apply to everything above the line either. It applies to the lesser of your net investment income or the amount by which your modified AGI exceeds the threshold:

NIIT=3.8%×min⁡(Net Investment Income, max⁡(0, MAGI−Threshold))\text{NIIT} = 3.8\% \times \min\bigl(\text{Net Investment Income},\ \max(0,\ \text{MAGI} - \text{Threshold})\bigr)

That distinction is the one most often gotten wrong. A single filer with $190,000 of other income and a $30,000 gain has a MAGI of $220,000, so only $20,000 of excess is exposed, not the full $30,000 gain. The NIIT is $760, not $1,140.

Because the surtax is charged on that capped base rather than on the gain itself, it is not a rate you can add to the capital gains rate. The combined rate this calculator reports is the total tax divided by the gain, which is derived after the fact rather than used as an input.

Worked Example

Scenario 1: Baseline long-term sale. Cost basis $50,000, sale price $120,000, held long-term, $80,000 of other taxable income.

Step 1: Net gain.

$120,000−$50,000=$70,000\$120{,}000 - \$50{,}000 = \$70{,}000

Step 2: Total taxable income for rate lookup.

$80,000+$70,000=$150,000\$80{,}000 + \$70{,}000 = \$150{,}000

Step 3: Rate selection. $150,000 sits between the 2026 single-filer LTCG thresholds of $49,450 and $545,500, so the 15% long-term rate applies. Total taxable income of $150,000 does not exceed the $200,000 NIIT threshold, so NIIT is $0.

Step 4: Tax due.

$70,000×15%=$10,500\$70{,}000 \times 15\% = \$10{,}500

Step 5: Net proceeds.

$120,000−$10,500=$109,500\$120{,}000 - \$10{,}500 = \$109{,}500

Effective tax rate on the gain: $10,500 / $70,000 = 15.00%.

Scenario 2: High earner crossing the NIIT threshold. Cost basis $100,000, sale price $250,000, held long-term, $200,000 of other taxable income.

Net gain is $150,000. Total taxable income is $350,000, still under the $545,500 top-bracket threshold, so the base long-term rate stays at 15%. But $350,000 exceeds the $200,000 NIIT threshold, adding 3.8% on the lesser of the gain or the amount over that threshold.

Combined Rate=15%+3.8%=18.8%\text{Combined Rate} = 15\% + 3.8\% = 18.8\%
Total Tax=$150,000×18.8%=$28,200\text{Total Tax} = \$150{,}000 \times 18.8\% = \$28{,}200

That single crossing of the $200,000 threshold adds $5,700 in NIIT on top of the base $22,500 in ordinary long-term tax, purely because of the surtax overlay.

Scenario 3: Capital loss. Cost basis $60,000, sale price $50,000. The sale produces a $10,000 loss, and this calculator returns $0 in tax due since it computes tax only on realized gains, not on losses that could otherwise offset other income.

What This Does Not Account For

  • The Section 121 primary residence exclusion. A homeowner who owned and lived in the property as a main home for at least 2 of the 5 years before the sale can exclude up to $250,000 of gain from tax entirely (up to $500,000 for a married couple filing jointly). This calculator taxes the full computed gain and does not apply that exclusion automatically, so running a primary-residence sale through this tool without first subtracting the eligible exclusion from the gain will significantly overstate the tax owed.
  • State capital gains tax. Most states tax capital gains as ordinary income at their own rates, in addition to the federal tax computed here; a handful of states have no income tax at all.
  • The 0% long-term bracket at low income. While the rate table above includes it, taxpayers whose total taxable income falls below the 0% threshold in real filings must also account for how the standard deduction and other income sources interact with that threshold, which this simplified tool does not model line by line.
  • Wash sale rules. Losses on securities repurchased within 30 days before or after the sale are disallowed under IRC Section 1091 and are not modeled here.
  • Collectibles and Section 1202 qualified small business stock. Collectibles (art, precious metals, certain coins) are taxed at a maximum 28% rate, and qualified small business stock can carry a partial or full exclusion, neither of which this general-purpose calculator applies.
  • Capital loss carryforwards. Losses in excess of $3,000 against ordinary income in a given year carry forward to future tax years, a multi-year effect this single-year calculator does not track.
  • Depreciation recapture. Real estate sales often trigger Section 1250 unrecaptured depreciation recapture taxed at up to 25%, separate from the standard long-term capital gains rate.

Common Pitfalls

  • Assuming the capital gains rate is based only on the gain. The rate bracket is determined by total taxable income, meaning the same $70,000 gain can be taxed at 0%, 15%, or 20% depending entirely on how much other income you report in the same year.
  • Selling one day too early. Missing the one-year-and-one-day holding threshold reclassifies a long-term gain as short-term, moving it from a preferential rate as low as 0% to full ordinary-income tax stacked on top of your other income, a meaningful difference on a large gain.
  • Forgetting the NIIT surtax exists. Many taxpayers correctly identify their long-term capital gains bracket but forget the additional 3.8% NIIT applies once total taxable income clears $200,000, understating their actual liability.
  • Confusing cost basis with purchase price. Cost basis should include purchase price plus qualifying improvements or acquisition costs and minus any prior depreciation claimed; using only the original purchase price can overstate or understate the true gain.
  • Netting gains and losses incorrectly. This calculator computes a single transaction in isolation; a full tax return nets short-term gains against short-term losses and long-term against long-term before combining the two categories, which can change the effective rate applied.

Frequently Asked Questions

What is the difference between short-term and long-term capital gains?
Short-term applies to assets held one year or less and is taxed as ordinary income, stacked on top of your other taxable income and run through the real 2026 bracket schedule. Long-term applies to assets held more than one year and receives preferential rates of 0%, 15%, or 20% based on total taxable income, which is why holding period is one of the most consequential decisions in tax planning around a sale.
How is my capital gains rate determined if I have other income?
The calculator adds your gain to your other taxable income to find total taxable income, then looks up the long-term rate bracket that total falls into. This means a large gain can push you from the 15% bracket into the 20% bracket even if the gain itself would have qualified for 0% in isolation.
What is the Net Investment Income Tax (NIIT)?
NIIT is a 3.8% Medicare surtax on investment income, including capital gains, that applies once your total taxable income exceeds $200,000 for single filers. It is calculated on top of, not instead of, the base capital gains rate.
Does this calculator account for my state's capital gains tax?
No. This tool computes federal capital gains tax only. State treatment varies widely, from no capital gains tax in several states to taxing gains as ordinary income at rates exceeding 13% in others.
Does this calculator account for the tax exclusion on selling my primary home?
Not automatically. Under IRC Section 121, a single filer who owned and lived in the home as a primary residence for at least 2 of the 5 years before the sale can exclude up to $250,000 of gain from tax, and a married couple filing jointly can exclude up to $500,000. To estimate the tax on a primary home sale, subtract your eligible exclusion from the raw gain (sale price minus cost basis and selling costs) before comparing this calculator's output to your expected bill, or enter $0 as the taxable gain if the full profit falls under the exclusion. Gain above the exclusion amount, and any unrecaptured Section 1250 depreciation from a rental period, is still taxed under the normal rules this calculator applies.
Can I use this calculator for cryptocurrency or real estate sales?
The core mechanics (basis, sale price, holding period, other income) apply to crypto and real estate the same way they apply to stock, but real estate sales can additionally trigger unrecaptured Section 1250 depreciation recapture, and crypto transactions can involve additional reporting complexity that this general-purpose calculator does not model.
What happens if I sell at a loss instead of a gain?
This calculator returns $0 in tax due for a loss, since it is designed to compute tax on realized gains. In an actual tax return, realized losses can offset other capital gains and up to $3,000 of ordinary income per year, with any excess carried forward to future years.

Sources

  • Internal Revenue Service, Revenue Procedure 2025-32, Internal Revenue Bulletin 2025-45 (annual inflation adjustments, including capital gains rate thresholds). irs.gov
  • Internal Revenue Service, Publication 550, Investment Income and Expenses. irs.gov/publications/p550
  • Internal Revenue Service, Topic No. 701, Sale of Your Home (IRC Section 121 exclusion). law.cornell.edu/uscode/text/26/121

Also consulted: Internal Revenue Service, Topic No. 409, Capital Gains and Losses; Internal Revenue Service, Form 8960 Instructions, Net Investment Income Tax.

Did this calculator answer your question?

Add This Website as Preferred Source on Google

See Bedrock Calculator first in your Search results & AI Overviews