Capital gains tax calculator
By Jude Wallis
Capital gains tax is charged on the gain, not on the sale proceeds. Sell for $40,000 something that cost $25,000 and the gain is $15,000. At a 15 percent rate the tax is $2,250.
Capital gains tax
$2,250.00
$15,000.00 of realised gain at 15.0%.
- Realised gain
- $15,000.00
- Tax
- $2,250.00
Put this on a class page: one iframe, free, for Google Sites, Canvas, WordPress or Notion.
On this page
The formula
Basis is what the asset cost, adjusted for commissions and improvements. is the rate that applies to the gain, entered as a percentage.
Basis is the number people get wrong
The tax is on $15,000, not on $40,000. That difference is basis: what the asset cost you. For shares it is the purchase price plus commission. For property it is the price plus buying costs plus improvements. Every dollar of basis you can document is a dollar the tax never touches.
Basis is also the part that goes missing. Reinvested dividends raise basis on a fund holding, and forgetting them means paying tax twice on the same money: once as income when the dividend was reinvested, once as gain because the basis was recorded too low.
The rate is an input, not a constant
The 15 percent used here is a rate you type in, so the identity works for whatever rate applies to the case: a long term rate, a short term rate that follows income, or a state rate layered on top. Enter the one that fits and the arithmetic is the same.
Holding period is what usually selects it. Assets held past the long term line are normally taxed at a lower rate than assets sold quickly, which can make the same $15,000 gain cost noticeably different amounts. See capital gains tax for the underlying idea and how investments are taxed for the wider picture.
Losses work the same way, backwards
A sale below basis produces a loss instead of a gain, and losses offset gains before any rate is applied. Selling one holding at a $5,000 gain and another at a loss of the same size nets to zero taxable gain, which is the whole idea behind tax loss harvesting.
That is also why the order of sales matters more than most people expect. The tax is computed on the net, so a gain realised in the same year as a loss is a different bill from the same gain realised alone.
What this identity covers
This is the gain and rate calculation for a single sale: proceeds, basis, one rate. Netting across many sales, the sale of a main home, and any threshold based surcharge are separate calculations that each start from a gain computed exactly this way. This is educational material, not financial advice.
Worked examples
A \$15,000 gain taxed at 15 percent
Shares bought for $25,000 are sold for $40,000. At a 15 percent rate, what is the gain and what is the tax?
- Gain: .
- Tax: .
The gain is $15,000 and the tax is $2,250, from $40,000 of proceeds against a $25,000 basis.
A smaller gain at the same rate
A second holding cost $20,000 and sells for $25,000. What is the tax at 15 percent?
- Gain: .
- Tax: .
The gain is $5,000 and the tax is $750. A third of the first gain, so a third of the tax.
Applying the rate to the sale price
Fifteen percent of the proceeds is , nearly three times the real bill of $2,250. The rate applies to the gain of $15,000, not to the $40,000 that arrived in the account. Anyone who has watched a sale confirmation and panicked has usually multiplied the wrong number.
Common questions
What counts towards basis?
The purchase price plus buying costs, commissions, improvements on property, and reinvested dividends on funds.
Which rate should I enter?
The one that applies to the holding period and income in question. The identity is the same whatever rate goes in.
Is this financial advice?
No. It is educational material for the gain and rate identity.
Keep reading
This page is educational material, not financial advice. The figures come from the formula shown and assume the inputs you enter hold for the whole term. Your own rate, fees, taxes and timing will differ, so treat the output as arithmetic to check a decision against, not as a recommendation.