> 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
| Total Taxable Income | Long-Term Rate |
|---|---|
| Below $49,450 | 0% |
| $49,450 – $545,500 | 15% |
| Above $545,500 | 20% |
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$$
Step 2: Total taxable income for rate lookup. $$\$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 \times 15\% = \$10{,}500$$
Step 5: Net proceeds. $$\$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.
$$\text{Combined Rate} = 15\% + 3.8\% = 18.8\%$$ $$\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
- 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?▸
How is my capital gains rate determined if I have other income?▸
What is the Net Investment Income Tax (NIIT)?▸
Does this calculator account for my state's capital gains tax?▸
Can I use this calculator for cryptocurrency or real estate sales?▸
What happens if I sell at a loss instead of a gain?▸
Sources
- Internal Revenue Service, Revenue Procedure 2025-32, Internal Revenue Bulletin 2025-45 (annual inflation adjustments, including capital gains rate thresholds).
- Internal Revenue Service, Topic No. 409, Capital Gains and Losses.
- Internal Revenue Service, Form 8960 Instructions, Net Investment Income Tax.
- Internal Revenue Service, Publication 550, Investment Income and Expenses.