Capital Gains Tax Calculator
Estimate your U.S. federal, state, and Net Investment Income Tax (NIIT) on a capital gain and see what you may keep after tax.
1. Enter your sale details
+ More tax options
| Net capital gain | $29,000.00 |
|---|---|
| Federal tax on gain | $4,350.00 |
| State tax on gain | $0.00 |
| NIIT | $0.00 |
| After-tax gain | $24,650.00 |
| Effective tax rate on gain | 15.00% |
Tax vs. after-tax gain
Federal thresholds use the 2026 tax-year framework configured in this calculator. State rates are user-entered.
Formula
Tax basis = Purchase price + Capital improvementsNet gain = Sale price − Selling costs − Tax basisLong-term federal tax = Gain stacked above taxable income at applicable 0%, 15%, and 20% thresholds.Short-term federal tax = Ordinary tax after gain − Ordinary tax before gain.
Worked example
With a $50,000 purchase, $80,000 sale, $1,000 selling costs, and $75,000 of taxable income before the gain, the net gain is $29,000. For a single filer holding the asset long-term, the estimated federal tax is $4,350.00 and the after-tax gain is $24,650.00.
About this calculator
This estimator applies the federal tax brackets and long-term capital-gain thresholds configured for the 2026 tax year. It can also estimate state tax and NIIT when enabled. It does not model every special tax rule, such as collectibles, unrecaptured §1250 gain, qualified small-business stock, AMT, credits, wash-sale adjustments, or detailed capital-loss carryovers.
How to use
- Enter the asset's purchase price, eligible capital improvements, sale price, and selling costs.
- Choose long-term or short-term treatment and enter taxable income before the gain.
- Open More tax options to select filing status or add optional NIIT and state tax estimates.
- Review federal tax, total tax, effective rate, and after-tax gain.
Why use it?
It helps estimate how much of an investment sale profit may be consumed by federal and optional state or NIIT taxes before making a transaction decision.
Important terms
- Tax basis: Generally your cost in the asset, adjusted for eligible items such as capital improvements.
- Long-term gain: Generally a gain on an asset held more than one year.
- Short-term gain: Generally a gain on an asset held one year or less and generally taxed as ordinary income.
- NIIT: An additional 3.8% tax that can apply to certain net investment income above applicable MAGI thresholds.