Capital Gains Tax Calculator
Enter your purchase price, sale price and income. In the default example a $15,000.00 gain held over a year owes about $832.50 in federal capital gains tax, an effective rate of 5.55%.
How the capital gains tax calculator works
A capital gain is the sale price minus your cost basis. The IRS treats the gain differently depending on how long you held the asset. As explained in IRS Topic No. 409, an asset held for more than one year produces a long-term gain, and one held for a year or less produces a short-term gain taxed as ordinary income.
For long-term gains this calculator uses the 2026 maximum zero-rate and 15-percent-rate amounts from IRS Revenue Procedure 2025-32 (tax year 2026). The gain is stacked on top of your other taxable income, so part of it can fall in a lower rate tier.
2026 long-term thresholds (taxable income)
- Single: 0% up to $49,450; 15% up to $545,500; 20% above
- Married filing jointly: 0% up to $98,900; 15% up to $613,700; 20% above
- Head of household: 0% up to $66,200; 15% up to $579,600; 20% above
- Married filing separately: 0% up to $49,450; 15% up to $306,850; 20% above
The formulas
Net investment income tax (NIIT) is 3.8 percent of the lesser of your net investment income or the amount your modified adjusted gross income exceeds a threshold. Per IRS Topic No. 559 the thresholds are $200,000 for single and head of household, $250,000 for married filing jointly and $125,000 for married filing separately. The calculator approximates MAGI as your other income plus the gain.
Example: This is an illustration. Buying for $20,000 and selling for $35,000 gives a gain of $15,000.00. With single filing status and $40,000 of other taxable income, part of the gain falls in the 0 percent tier and the rest in the 15 percent tier, for a tax of $832.50. NIIT is $0.00, so the total is $832.50 and profit after tax is $14,167.50. Had the same gain been short-term at a 22 percent ordinary rate, the tax would be $3,300.00.
What it does not cover
Special rates for collectibles and unrecaptured section 1250 gain, state taxes, capital loss carryovers, the home sale exclusion and wash sale rules are not modeled. Short-term tax uses a flat rate you enter rather than full brackets. This tool is not tax advice, so confirm your numbers with a tax professional.
Free pricing tips for your business
Get short, practical tips on pricing jobs and using our free calculators. No spam, unsubscribe any time.
Frequently asked questions
What is the difference between short-term and long-term capital gains?
Long-term means you held the asset more than one year and the gain gets the 0, 15 or 20 percent rates. Short-term gains are taxed as ordinary income. In the default example long-term tax is $832.50 against $3,300.00 short-term.
What are the 2026 long-term capital gains thresholds?
For single filers the 0 percent rate applies up to $49,450 of taxable income and the 15 percent rate up to $545,500, per IRS Revenue Procedure 2025-32. See the list above for other filing statuses.
What is the net investment income tax?
A 3.8 percent tax on net investment income for people whose modified AGI is above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately).
Does my gain count as income for the 0 percent rate?
Yes. The gain is stacked on top of your other taxable income, so the 0 percent rate applies only to the part that fits under the threshold.
Does this include state tax?
No. This tool covers federal tax only. Many states tax capital gains too, so check your state rules.
Need a custom calculator or spreadsheet built for your business?
Talk to usMore free tools: All free calculators · ROI calculator · Self-employment tax calculator · Paycheck calculator


