Capital Gains Tax Calculator
Estimate U.S. capital gains tax from sale proceeds and adjusted basis with verified losses, federal brackets and an optional NIIT estimate.| Layer | Amount | Rule or meaning | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.note }} |
Rate path
{{ treatmentExplanation }}
Scenario range
{{ scenarioExplanation }}
Before acting
Verify basis, holding period, annual loss netting, special-rate gain amounts, exclusions, NIIT inputs, and state rules. Use the applicable Schedule D or Qualified Dividends and Capital Gain Tax Worksheet for filing.
Source version
{{ values.source_label }}. IRS rules reviewed 2026-08-12.
Selling an investment, digital asset, collectible, or home does not make the sale price taxable by itself. The starting point is gain: the amount realized from the sale minus adjusted basis and allowable selling costs. Basis may differ sharply from the original purchase price after reinvestments, splits, inherited or gifted property rules, capital improvements, and prior adjustments.
Tax treatment then depends on the asset and holding period. A gain is generally long term when the asset was held for more than one year and short term when held for one year or less. Most net long-term gains use preferential federal rates, while short-term gains are taxed through ordinary income brackets. Collectibles and unrecaptured section 1250 gain have separate maximum-rate treatment.
| Term | Practical meaning | Why it matters |
|---|---|---|
| Adjusted basis | The supported tax cost of the asset after applicable adjustments | A higher valid basis reduces realized gain |
| Taxable income before gain | Income after deductions, excluding the modeled gain | Long-term gain stacks above it across the 0%, 15%, and 20% ranges |
| Modified adjusted gross income | The income measure used for the Net Investment Income Tax | It is not the same input as taxable income and has separate thresholds |
Capital losses, a qualified main-home exclusion, and other verified adjustments can reduce the modeled taxable gain, but each requires its own eligibility and documentation. A dollar entered as an offset is not proof that the tax return permits it.
Federal capital-gain tax is also only part of the possible liability. The 3.8% Net Investment Income Tax (NIIT), state or local tax, depreciation recapture, installment-sale rules, wash sales, multiple tax lots, and other return items can change the result. An estimate is useful for sale planning and comparison, not for deciding asset classification or filing a return.
How to Use This Tool:
Use figures from the return year and records for the exact asset or lot being modeled.
- Choose the Tax year, expected Filing status, and verified Gain treatment. The treatment choice must come from the asset facts, not from the lowest displayed estimate.
- Enter gross Sale proceeds, adjusted basis before any separate additions, and selling costs that properly reduce this sale's gain.
- Enter taxable income before the gain. Add only capital loss offsets and a main-home exclusion amount already confirmed as available for this transaction.
- For an NIIT estimate, enter modified adjusted gross income before this gain and leave the 3.8% option enabled. Add verified basis adjustments, other gain adjustments, or a state rate only when supported.
- Review Taxable gain, the federal and NIIT lines, and After-tax proceeds. Recheck basis, holding period, gain character, and exclusions before relying on the total.
Interpreting Results:
Total tax is the sum of the modeled federal gain tax, optional NIIT, and the user-supplied flat state or local amount. Effective tax rate divides that total by taxable gain, so it is not a marginal bracket and should not be applied to the full sale price.
- Realized gain is before modeled losses and exclusions. Taxable gain is what remains after those reductions.
- The 0%, 15%, and 20% rows show how a standard long-term gain is stacked above other taxable income. Crossing a threshold moves only the dollars above that boundary into the next rate range.
- After-tax proceeds subtracts selling costs and modeled tax from gross proceeds. It does not subtract basis because basis is the capital recovered through the sale, not a cash payment made at closing.
- A low or zero estimate is not proof that no tax is due. Compare it with Schedule D, Form 8949, Form 8960, property records, and jurisdiction-specific rules or have a qualified professional review it.
Technical Details:
The model covers individual U.S. federal estimates for tax years 2025 and 2026. It first computes one sale's realized gain, applies nonnegative offsets in a fixed order, and then taxes the remainder according to the selected treatment.
Formula Core
Realized gain subtracts adjusted basis, additional basis, and selling costs from gross sale proceeds.
P is sale proceeds, B is adjusted cost basis before separately entered additions, A is additional basis, and C is selling costs. Loss offsets are applied first, then an eligible home exclusion when main-home treatment is selected, then any other verified gain adjustment. Each deduction is capped at the gain still remaining, so taxable gain cannot fall below 0.
Rule Core
| Treatment | Federal rule |
|---|---|
| Standard long term or qualified home-sale remainder | Allocate gain across the 0%, 15%, and 20% ranges, then use the lower of that amount and the incremental ordinary-income tax. |
| Short term | Ordinary tax on taxable income plus gain minus ordinary tax on taxable income before gain. |
| Collectibles or taxable section 1202 gain | Incremental ordinary tax with each bracket rate capped at 28%. |
| Unrecaptured section 1250 gain | Incremental ordinary tax with each bracket rate capped at 25%. |
| Custom federal rate | Taxable gain multiplied by the entered flat percentage. |
For standard long-term gain, other taxable income fills each capital-gain range first. The following values are the maximum taxable-income amounts for the 0% and 15% rates. Income above the second amount enters the 20% range.
| Year | Filing status | 0% maximum | 15% maximum |
|---|---|---|---|
| 2025 | Single | $48,350 | $533,400 |
| 2025 | Married filing jointly | $96,700 | $600,050 |
| 2025 | Married filing separately | $48,350 | $300,000 |
| 2025 | Head of household | $64,750 | $566,700 |
| 2026 | Single | $49,450 | $545,500 |
| 2026 | Married filing jointly | $98,900 | $613,700 |
| 2026 | Married filing separately | $49,450 | $306,850 |
| 2026 | Head of household | $66,200 | $579,600 |
NIIT is modeled at 3.8% on the lesser of taxable gain and modified adjusted gross income above the filing-status threshold.
The threshold T is $200,000 for single or head of household, $250,000 for married filing jointly, and $125,000 for married filing separately. M is MAGI before the modeled gain. A state or local amount, when entered, is simply taxable gain multiplied by the supplied flat rate. Monetary outputs are rounded to cents.
Limitations:
This is an educational sale estimate, not tax, legal, or financial advice. It does not determine eligibility or reproduce a complete federal or state return.
- Loss offsets are entered as an already verified amount; Schedule D netting and the annual deduction rules are not calculated.
- Main-home options model only an exclusion amount. Ownership, use, timing, prior-sale, partial-exclusion, depreciation, and reporting tests remain outside the estimate.
- Lot selection, wash sales, inherited and gifted basis, installment sales, business property, partnership interests, and depreciation recapture beyond the selected maximum-rate treatment may require different calculations.
- The state or local line uses one flat rate and does not model brackets, sourcing, deductions, exclusions, credits, or residency rules.
Worked Example:
A 2026 single filer with a long-term sale
A $100,000 sale with $50,000 basis and $2,000 selling costs creates a $48,000 taxable gain when no offset applies. With $40,000 of other taxable income, the first $9,450 fills the remaining 0% range and $38,550 enters the 15% range. Federal gain tax is $5,782.50. With no NIIT or state amount, after-tax proceeds are $92,217.50. The result changes if basis, gain character, losses, MAGI, or jurisdictional rules differ.
References:
- Revenue Procedure 2025-32, Internal Revenue Service, 2025.
- Topic no. 409, Capital gains and losses, Internal Revenue Service.
- Publication 550 (2025), Investment Income and Expenses, Internal Revenue Service, 2025.
- Net Investment Income Tax, Internal Revenue Service.
- Topic no. 701, Sale of your home, Internal Revenue Service.