
Rex says
Money math without the spreadsheet headache. Plug in your numbers and I'll show you exactly where the dollars land.
Try a scenario
Click to load — tweak from there.Inputs
Result
Total capital gains tax
$9,000
Profit after tax
$36,000
Taxable gain
$45,000
Federal tax
$6,750
State tax
$2,250
Effective tax rate on the gain
20.00%

Psst — share this and help Rex grow
One click, a permanent link with your numbers baked in.
How to use this
- 1Enter sale proceeds ($).
- 2Enter cost basis ($).
- 3Enter capital losses to offset ($).
- 4Enter holding period.
- 5Enter long-term rate (%).
- 6Enter ordinary income tax rate (%).
- 7Enter state tax rate (%).
- 8Enter subject to 3.8% net investment income tax?.
- 9Read your total capital gains tax on the right — it updates as you type.
- 10Hit Share to keep the scenario or send it to someone.
About this calculator
Holding past one year moves a gain from ordinary income rates to long-term rates of 0%, 15%, or 20% — often a 10–20 point swing on the same profit.
Worked example
Using the values the calculator loads with:
Inputs
- Sale proceeds: 90000 $
- Cost basis: 45000 $
- Capital losses to offset: 0 $
- Holding period: More than 1 year
- Long-term rate: 15 %
- Ordinary income tax rate: 24 %
- State tax rate: 5 %
- Subject to 3.8% net investment income tax?: No
Results
- Total capital gains tax: $9,000.00
- Profit after tax: $36,000.00
- Taxable gain: $45,000.00
- Federal tax: $6,750.00
- State tax: $2,250.00
- Effective tax rate on the gain: 20.00%
What each field means
Inputs
- Sale proceeds ($)
- The sale proceeds used in the calculation, measured in $. Starts at 90000 $ so you have a working example on load.
- Cost basis ($)
- The cost basis used in the calculation, measured in $. Starts at 45000 $ so you have a working example on load.
- Capital losses to offset ($)
- The capital losses to offset used in the calculation, measured in $. Starts at 0 $ so you have a working example on load.
- Holding period
- Pick the option that matches your situation — the maths changes per option. Choices: More than 1 year, 1 year or less.
- Long-term rate (%)
- The long-term rate used in the calculation, measured in %. Starts at 15 % so you have a working example on load. Accepted range: 0–25 %.
- Ordinary income tax rate (%)
- The ordinary income tax rate used in the calculation, measured in %. Starts at 24 % so you have a working example on load. Accepted range: 0–50 %.
- State tax rate (%)
- The state tax rate used in the calculation, measured in %. Starts at 5 % so you have a working example on load. Accepted range: 0–15 %.
- Subject to 3.8% net investment income tax?
- Pick the option that matches your situation — the maths changes per option. Choices: No, Yes.
Results
- Total capital gains tax
- Returned as a money amount in US dollars and shown as the headline result. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Profit after tax
- Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Taxable gain
- Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Federal tax
- Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- State tax
- Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Effective tax rate on the gain
- Returned as a percentage. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
FAQ
How does the capital gains tax calculator work?
Holding past one year moves a gain from ordinary income rates to long-term rates of 0%, 15%, or 20% — often a 10–20 point swing on the same profit. The underlying maths is: Tax = (Proceeds − Basis − Losses) × applicable rate.
What do I need to enter?
8 values: sale proceeds, cost basis, capital losses to offset, holding period, long-term rate, ordinary income tax rate, state tax rate, and subject to 3.8% net investment income tax?. Each field starts with a sensible default, so you can change one number at a time and watch the result move.
What does the total capital gains tax result mean?
It is returned as a money amount in US dollars and updates live as you edit the inputs, so you can compare two or three versions of a scenario in a few seconds.
Is this calculator free, and do I need an account?
Yes, it's free, and no account is required. Nothing you type is stored on our servers — the maths runs entirely in your browser.
How accurate is the result?
It applies the standard formula exactly, so the arithmetic is precise. Results are estimates before tax, fees, and inflation unless an input explicitly covers them.
Who is this tool for?
It's built for anyone comparing money scenarios before committing — budgeting a payment, sanity-checking a quote, or seeing what a change in rate or term actually costs.
Accuracy and limitations
- Results are estimates before tax, fees, and inflation unless an input explicitly covers them.
- Rates are treated as fixed for the whole period — variable-rate products will drift from this projection.
- This is educational maths, not financial advice. Check anything contractual with the lender or your accountant.
Related tools
Cite this calculator
Writing about this topic? Grab a citation — every link helps keep these tools free.
RevenueLab. (2026). Capital Gains Tax Calculator. Retrieved from https://www.revenuelab.fyi/toolbox/capital-gains-tax
<p>Source: <a href="https://www.revenuelab.fyi/toolbox/capital-gains-tax" target="_blank" rel="noopener">Capital Gains Tax Calculator — RevenueLab</a> (2026).</p>
Source: [Capital Gains Tax Calculator — RevenueLab](https://www.revenuelab.fyi/toolbox/capital-gains-tax) (2026).
