Capital Gains Tax Calculator
Work out US or UK capital gains tax, with gains correctly stacked on top of your income so a single gain can span two rates.
How to use this calculator
- 1Choose your jurisdiction, and for the US your filing status.
- 2Enter your other taxable income — this decides which band the gain falls into.
- 3Enter the sale proceeds and what you originally paid, including costs.
- 4Add any losses to offset, and check the band table to see how the gain was split.
How the calculation works
gain = proceeds − cost basis − losses taxable = gain − allowance tax = Σ (portion of gain in each band × that band's rate) the gain sits on top of income- cost basis
- What you paid, plus buying and selling costs and capital improvements
- allowance
- The UK annual exempt amount of £3,000. The US has no equivalent, but has a 0% band
- stacking
- Gains are treated as the top slice of income, so the rate depends on what you already earn
- NIIT
- US Net Investment Income Tax: an extra 3.8% on investment income above a fixed MAGI threshold
The rate is decided by total taxable income, not by the size of the gain. The same gain can be taxed at 0%, 15% or 20% in the US depending entirely on the salary underneath it.
A single gain can span two rate bands, with part taxed at each. This is where most capital gains arithmetic goes wrong — applying one flat rate to the whole gain can be wrong by thousands.
Losses are deducted before any allowance, which is why realising a loss in the same year as a large gain is worth more than realising it in a quiet year.
US short-term gains, on assets held a year or less, get no preferential rate at all and are taxed as ordinary income. The one-year line is the largest single lever in US capital gains planning.
Worked example
A $50,000 long-term gain on an $80,000 salary
- 1.Gain: $120,000 − $70,000 = $50,000, held more than a year.
- 2.For a single filer in 2026 the 0% band runs to $49,450 and the 15% band to $545,500.
- 3.Income of $80,000 already exceeds the 0% band, so the gain starts inside the 15% band.
- 4.The whole $50,000 is taxed at 15% = $7,500.
- 5.NIIT: modified AGI is $130,000, below the $200,000 threshold, so none applies.
- 6.Total tax $7,500 — an effective rate of 15% on the gain.
Result: $7,500 tax, 15% effective
The same gain on a low income — the 0% band
- 1.The same $50,000 gain, but income is now $20,000.
- 2.The gain stacks on top: it occupies the span from $20,000 to $70,000.
- 3.The 0% band runs to $49,450, so $29,450 of the gain falls in it — taxed at nothing.
- 4.The remaining $20,550 falls in the 15% band: $3,082.50.
- 5.Total tax $3,082.50 against $7,500 on the higher income — the identical gain, taxed less than half as much.
- 6.This is the stacking effect, and it is why the rate depends on income rather than on the gain.
Result: $3,082.50 — the gain spans two bands
A £50,000 UK gain on a £45,000 salary
- 1.Gain: £50,000. The annual exempt amount of £3,000 comes off, leaving £47,000 taxable.
- 2.Income of £45,000 less the £12,570 personal allowance is £32,430 of taxed income.
- 3.The basic rate band runs to £37,700 above the allowance, so £5,270 of it is unused.
- 4.That £5,270 of gain is taxed at 18% = £948.60.
- 5.The remaining £41,730 is taxed at 24% = £10,015.20.
- 6.Total £10,963.80 — an effective rate of 21.9% on the gain.
Result: £10,963.80 across both rates
Gains stack on top of income, and that decides everything
The single most misunderstood thing about capital gains tax is that the rate depends on your total taxable income, not on the size of the gain. Gains are treated as the top slice — they sit on top of your salary, and the bands they land in are whatever remains after income has filled the lower ones.
The consequence is dramatic. An identical $50,000 long-term gain costs $7,500 for someone earning $80,000 and $3,082.50 for someone earning $20,000, because the second person still has room in the 0% band. Nothing about the investment differs; only the income underneath it.
It also means a single gain frequently spans two rate bands, with part taxed at one rate and part at the next. Calculators that apply a single flat rate to the whole gain get this wrong, and on a large disposal the error runs to thousands.
The one-year line, and the 3.8% nobody mentions
In the US, holding an asset for one year and a day rather than one year exactly changes everything. Short-term gains get no preferential treatment and are taxed as ordinary income — up to 37% federally. Long-term gains top out at 20%. For a higher-rate taxpayer that is a 17-point swing decided by the calendar, and it is the largest single lever in capital gains planning.
The Net Investment Income Tax adds a further 3.8% on investment income above $200,000 for single filers or $250,000 married. It is charged on the lesser of net investment income and the amount by which modified AGI exceeds the threshold, so it phases in rather than hitting all at once.
What makes NIIT worth flagging is that its thresholds have been fixed in statute since 2013 and have never been indexed for inflation. Every year of wage growth pulls more people into it. A threshold that caught genuinely high earners when written now reaches a good deal further down, and it will keep doing so until Congress changes the numbers.
The UK allowance has been cut by three-quarters
The UK annual exempt amount was £12,300 in 2022-23. It fell to £6,000 the following year and to £3,000 from 2024-25, where it remains. That is a 76% cut in two steps, and it has pulled very large numbers of ordinary investors into filing for the first time.
A gain that was entirely covered by the allowance three years ago is now almost entirely taxable. Someone realising a £12,000 gain paid nothing in 2022-23 and now pays tax on £9,000 of it — up to £2,160 at the higher rate.
The October 2024 Budget also unified the rates. Residential property, which had carried a higher 28% top rate, now sits at the same 18% and 24% as shares and other assets. Property investors saw their top rate fall while everyone else saw theirs rise, which is unusual and worth knowing if you are working from older guidance.
What this assumes, and where it stops
Assumptions
- US figures are 2026 federal long-term capital gains brackets; UK figures are 2026-27.
- Gains are treated as the top slice of income, which is how both jurisdictions actually assess them.
- The cost basis entered already includes acquisition and disposal costs.
- Losses are applied before any allowance or exemption.
- US modified AGI for the NIIT calculation is approximated as other income plus the gain.
Limitations
- Federal or national tax only. Most US states tax capital gains as ordinary income, and California and New York in particular add substantially to the figure.
- Does not handle collectibles at up to 28%, unrecaptured section 1250 gain at up to 25%, or Qualified Small Business Stock exclusions.
- Does not apply the US primary residence exclusion of $250,000 single or $500,000 married, or UK Private Residence Relief — both of which usually eliminate the gain on a main home entirely.
- Ignores loss carryforward limits, including the US $3,000 annual cap on deducting net losses against ordinary income.
- UK Business Asset Disposal Relief, trusts, personal representatives and non-residents are not modelled.
- An estimate, not tax advice. Tax on a significant disposal is worth checking with an accountant.
Common questions
How is capital gains tax calculated?
Subtract what you paid from what you sold for, deduct any losses and allowance, then tax the remainder — but at a rate determined by your total income, because gains stack on top of it. A gain frequently spans two rate bands, with part taxed at each.
Why does the same gain cost different people different amounts?
Because the rate depends on the income underneath the gain. A $50,000 US long-term gain costs $7,500 on an $80,000 salary but only $3,082.50 on a $20,000 salary, since the lower earner still has room in the 0% band. The investment is identical; the income is not.
What is the difference between short-term and long-term capital gains?
In the US, assets held more than a year qualify for preferential long-term rates of 0%, 15% or 20%. Held a year or less, the gain is short-term and taxed as ordinary income at up to 37%. For a higher-rate taxpayer that is a 17-point difference decided purely by the holding period.
How much is the UK capital gains allowance?
£3,000 for 2026-27, down from £12,300 in 2022-23 — a cut of about three-quarters in two steps. Gains above that are taxed at 18% within your basic rate band and 24% above it, with residential property now taxed at the same rates as other assets since the October 2024 Budget.
Sources
Formula and content last reviewed on .
Results are estimates for information only, not professional advice.
Related calculators
Tools people commonly use alongside the capital gains tax calculator.