About this tool
Work out your capital gain, tax owed and net profit on an investment.
The Capital Gains Calculator works out the capital gain on a holding as (sell price − buy price) × quantity, applies the tax rate you enter to that gain, and reports the tax owed, the net profit after tax, and the percentage return on the buy price. You supply the rate, so it works for any jurisdiction and for either a short-term or long-term slab — the tool does not assume one. Tax is applied only when the result is a gain; a loss returns zero tax rather than a negative figure, because how losses are offset depends on your local rules.
Open Capital Gains Calculator on AltFTool — it loads instantly in your browser.
Type the two unit prices into the Buy price (per unit) and Sell price (per unit) number fields, which open prefilled with 100 and 150. The result recalculates as you type — there is no Calculate button to press.
Set Quantity to the number of units you sold. The headline reads Gain followed by the total amount, or Loss when the sell price is below the buy price.
Enter your Tax rate (%) and read the Tax owed, Net profit and Return cards below the headline; tax is applied only to a gain, never to a loss. Copy or Download saves your inputs and every figure as capital-gains-calculator.txt, and Reset restores the defaults.
The result separates the gain, the tax on it and what is left, so the number you plan around is the one you actually keep.
Because the rate is an input rather than a hardcoded assumption, the same tool works for a 10%, 15%, 20% or 30% regime without going out of date.
The return is computed against the buy price, which makes a 5,000 gain on a 10,000 position instantly distinguishable from the same gain on a 100,000 one.
Sell price minus buy price, multiplied by the number of units. Selling 100 units bought at 100 for 150 gives (150 − 100) × 100 = a 5,000 gain, which at a 15% rate means 750 in tax and 4,250 net — a 50% return on the purchase price.
The rate that applies to this specific gain in your country and holding period — most systems tax short-term and long-term gains differently, and some apply an annual exempt amount before any tax is due. Look up the current rate for your situation rather than reusing the 15% default, and confirm it with a tax professional before acting on the result.
No. The calculation uses only buy price, sell price, quantity and rate — it does not subtract brokerage, transaction taxes, exchange charges or any tax-free allowance, and it does not apply indexation or cost-inflation adjustment. Deduct fees from your figures first if you want a closer estimate.
The tool shows the loss and sets tax owed to zero, because a loss creates no liability. It does not model carry-forward or set-off against other gains, which most tax systems allow under specific conditions and time limits — that part needs your local rules or an accountant.
Add the Capital Gains Calculator widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/capital-gains-calculator"
title="Capital Gains Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/capital-gains-calculator?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>