Capital Gains Tax Calculator
Estimate capital gains tax, with the holding period and cost basis rules that change the bill most.
Output
Planning cloud or compliance spend?
Our team optimises cloud cost & risk for finance leaders.
The holding period is the biggest lever
In most systems, assets held beyond a threshold — commonly one year — are taxed at preferential long-term rates, while shorter holdings are taxed as ordinary income. The difference is frequently 10 to 20 percentage points. Selling a week before the anniversary rather than a week after can cost more than the price movement you were trying to capture, which makes the purchase date worth checking before any sale.
Cost basis is what you actually pay tax on
The gain is proceeds minus basis, and basis is more than the purchase price. It includes commissions, transfer taxes and, for property, capital improvements. Reinvested dividends increase basis and are routinely omitted, which causes people to pay tax twice on the same money — once as dividend income and again as an inflated capital gain. Records matter more than the calculation.
Which shares you sold changes the answer
With multiple purchase lots, FIFO assumes the oldest first, while specific identification lets you nominate lots where permitted. Choosing high-basis lots reduces the taxable gain. Some jurisdictions mandate a pooled average instead and remove the choice entirely. The method must generally be applied consistently rather than selected per trade.
Losses offset gains, and the rules have teeth
Realised losses reduce realised gains, and unused losses often carry forward. Wash sale rules block claiming a loss if a substantially identical asset is repurchased within a defined window, commonly 30 days either side, and the disallowed loss is added to the new position's basis rather than lost. Buying back the same fund a week later is the usual way this rule is triggered accidentally.
Nothing is owed until you sell
Unrealised gains are not taxed in most systems, which is why holding defers the liability indefinitely. This is also why forced selling — rebalancing, a fund closing, an inherited position being liquidated — creates a tax event that had nothing to do with your own decision.
This is an estimate
Rates depend on jurisdiction, total income, filing status, asset type and any exemptions such as a primary residence allowance. Investment property, collectibles and crypto are frequently treated differently from listed shares. Use the figure for planning and a professional for anything binding.
Frequently Asked Questions
Privacy & Security
Calculated locally in your browser. Tax depends on country and holding period.
How to Use
Enter buy/sell details to compute gain or loss.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
Compound Interest Calculator
FinanceProject how savings or investments grow with compound interest and regular contributions, in both nominal and inflation-adjusted terms.
Mortgage Calculator
FinanceCalculate mortgage payments from price, deposit, rate and term, with total interest, amortisation and the costs beyond principal and interest.
EMI Calculator
FinanceCalculate equated monthly instalments for a loan, with total interest, amortisation breakdown and the effect of prepayment.