Finance

Capital Gains Tax Calculator

Calculate capital gains tax on investments based on income and holding period.

CALCULATOR

Enter your numbers

Instant results

THE NUMORIX GUIDE

How to use the Capital Gains Tax Calculator

Last reviewed September 14, 2026

What this calculator does

The engine finds gain = sale price - purchase price.

Formula and method

The engine finds gain = sale price - purchase price. A nonpositive gain produces zero tax. Otherwise it classifies a holding period of at least one year as long-term, selects its embedded filing-status bracket table, computes bracket tax on annual income plus the gain, subtracts tax on annual income alone, and reports the difference as tax on the gain.

Variables and inputs

Enter Purchase Price, Sale Price, Holding Period in years, Filing Status, and Annual Income. The status choices are Single, Married Filing Jointly, and Head of Household. Dollar values are not adjusted for basis additions, selling costs, state tax, or a separate tax year field.

Worked example

For a $50,000 purchase, $80,000 sale, three-year holding period, single filing status, and $75,000 annual income, gain = $30,000 and the route selects long-term treatment. Its embedded brackets produce tax on $105,000 minus tax on $75,000 of about $4,500, an effective rate of 15% on the gain.

How to interpret the result

The result is the incremental federal-style tax from adding the entered gain to the entered income under the route's bracket table. It is not simply gain multiplied by one rate in every case, because a gain can cross bracket thresholds and short-term gains use the ordinary-income table.

Common mistakes to avoid

Use adjusted tax basis rather than an unadjusted purchase price when the real transaction includes reinvested dividends, improvements, or prior depreciation. Count the holding period correctly, select the actual filing status, and enter income in dollars rather than a tax rate.

Assumptions and limitations

The bracket thresholds are hardcoded and the UI has no tax-year selector. The engine excludes federal net investment income tax, state and local tax, exemptions, deductions, losses, collectibles, depreciation recapture, selling expenses, wash-sale rules, and special assets. It is not a tax return or filing recommendation.

Sources and references

COMMON QUESTIONS

Frequently asked questions

What changes at one year?

The route uses long-term brackets when holdingPeriod is at least 1 and short-term brackets below 1. The exact tax treatment of a real sale also depends on the asset, dates, basis, and current tax law.

What if the sale price is below the purchase price?

The engine returns zero tax when gain is zero or negative. It does not calculate how a deductible capital loss could offset other gains or income.

Does the result use current tax brackets?

Not necessarily. The bracket table is embedded in the engine and the form has no tax-year selector. Check the IRS rules for the year of the sale before relying on a number.

FROM THE NUMORIX GUIDES

Learn more before you decide