Capital Gains Tax Calculator
Calculate the capital gains tax on investments, stocks or crypto: gross gain, taxable amount net of losses, tax due, net profit and return. Free and multilingual.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
Have you sold stocks, ETFs, cryptocurrencies or another investment at a gain and want to know what you keep after tax? This capital gains tax calculator tells you in seconds. From the purchase price, sale price, costs, your tax rate and any losses to offset, it calculates the gross gain, the taxable amount net of prior losses, the tax due, the net gain and the real return. It is the right tool to plan your sales and understand the actual profit of your investments.
What capital gains tax is
Capital gains tax is the tax paid on the profit realised when selling an asset for more than its purchase price. It applies to stocks, bonds, ETFs, funds, cryptocurrencies and, in many countries, non-primary real estate. The tax hits only the gain, not the whole proceeds: if you buy at €10,000 and sell at €15,000, the tax is calculated on the €5,000 gain. Knowing in advance how much you will owe helps you decide when and how much to sell.
Capital gain and capital loss
The capital gain is the profit: sale price minus purchase price (and costs). The capital loss is the loss, when you sell for less than you paid. The distinction is fundamental because, in most tax systems, realised losses can offset gains, reducing the tax. This calculator handles both cases: if the result is a loss, there is no tax and the loss remains available to offset future gains.
How the calculator works
Enter five values: the purchase price, the sale price, the transaction costs, your tax rate on capital gains and any prior losses to offset. The calculator derives the gross gain, subtracts losses to get the taxable amount, applies the rate for the tax and shows you what you keep net and the real return. Change the values to simulate different sale scenarios and optimise your taxation.
The values you need
The purchase price is the cost at which you bought (the cost basis). The sale price is what you collected. The transaction costs are buying and selling fees, deductible from the gain. The tax rate is your country's percentage on financial capital gains (you enter it, because it varies a lot). The prior losses are losses realised in the past and still available to offset: they reduce the taxable amount.
The gross capital gain
The gross capital gain is the profit before tax: sale price minus purchase price, minus transaction costs. It is the basis from which the whole calculation starts. Including costs matters: trading fees, spreads and other expenses reduce the real gain and therefore the tax. If the gross gain is negative, you have a capital loss: you pay no tax and record a tax loss usable in the future.
The taxable amount and losses
The taxable amount is the part of the gain actually taxed, after subtracting offsettable prior losses. It is the heart of tax planning: if you have accumulated losses on other investments, you can use them to reduce the taxable gain. With a €5,000 gain and €2,000 of prior losses, the taxable amount drops to €3,000 and you pay tax only on that figure. The calculator applies this offsetting automatically.
The tax due and the rate
The tax due is the taxable amount times the rate. The capital gains rate varies enormously from country to country and sometimes by investment duration or asset type. In Italy, for example, financial returns are taxed at 26% (with exceptions for government bonds). Enter the correct rate for your situation: the calculator does not assume a specific country, so it works wherever you are.
The net gain and the return
The net capital gain is what really stays in your pocket: the gross gain minus the tax. The net return relates this gain to the invested capital, giving you the real performance after tax. It is the number that matters when evaluating an investment: an attractive gross return can shrink significantly after tax. Comparing the net return across different assets and maturities helps you make more informed decisions.
Capital gains rates around the world
The rate varies a lot by country and income type. Here are some indicative values for financial returns:
| Country | Indicative rate |
|---|---|
| Italy | 26% (12.5% government bonds) |
| Spain | 19–28% (tiered) |
| France | 30% (flat tax) |
| Germany | ~26.4% (Abgeltungsteuer) |
These are broad indications, subject to change and exceptions. Always check the up-to-date rate for your country and situation, and enter it in the calculator.
Offsetting capital losses
Offsetting (tax-loss harvesting) is one of the most effective tax strategies. By voluntarily realising a loss on an underwater investment, you generate a capital loss that can offset gains, reducing the overall tax. Unused losses can usually be carried forward for some years (in Italy, up to the fourth following year). Planning year-end sales taking gains and losses into account can save you significant amounts, entirely legally.
Capital gains by asset type
The tax treatment can change depending on the asset sold:
| Asset | Typical tax notes |
|---|---|
| Stocks / ETFs / funds | financial returns rate |
| Cryptocurrencies | often as financial returns, with thresholds |
| Real estate | specific rules and exemptions (primary home, years) |
| Bonds / government securities | sometimes a reduced rate |
This calculator is general: enter the correct rate for the asset and country. For real estate and special cases, the rules can be more complex than for financial returns.
Short-term and long-term investments
In several countries (notably the United States) the rate depends on the investment duration: long-term gains (over a year) are taxed less than short-term ones. In others, like Italy, the rate is fixed regardless of duration. If duration matters in your country, enter the rate corresponding to your holding period: it is often worth waiting for the long-term threshold before selling, to reduce the tax.
Capital gains and cryptocurrencies
Cryptocurrencies are one of the most current tax topics. In many countries crypto gains are taxed as financial returns, often with exemption thresholds and reporting obligations. Every conversion (even from one crypto to another) can be a taxable event. Tracking purchase and sale prices is essential: use this calculator to estimate the tax on each operation, entering the rate your jurisdiction sets for crypto assets.
How to reduce the tax legally
There are legitimate strategies to optimise: offset gains and losses in the same year, use the exemption thresholds where they exist, wait for the long term if the rate is lower, use tax-efficient vehicles (pension plans, advantaged accounts) and spread sales across several tax years. The calculator helps you quantify the effect of each choice, but for important decisions consult a tax advisor.
Common mistakes
- Calculating the tax on the whole proceeds instead of the gain only.
- Forgetting to subtract transaction costs from the gain.
- Not offsetting prior losses, paying more than due.
- Ignoring the thresholds and exemptions of your country.
- Using a wrong or outdated rate.
How to use the calculator
Enter purchase and sale price, costs, your rate and the losses to offset to immediately get tax and net gain. Try different scenarios: what happens if you offset losses from another investment? If the rate were lower waiting for the long term? By comparing the results you understand how to plan sales to maximise the net return, always respecting your country's tax rules.
Practical example
You bought an investment at €10,000, sell it at €15,000, with €100 of costs and a 26% rate, with no prior losses. The result: a gross gain of €4,900, a taxable amount of €4,900, a tax of €1,274, a net gain of €3,626 and a net return of 36.26%. If you had €2,000 of prior losses, the taxable amount would drop to €2,900 and the tax to €754. Enter your numbers for your real situation. This tool is informational and does not constitute tax advice.
Frequently asked questions
What is capital gains tax?
It is the tax on the profit realised when selling an investment for more than the purchase price. It hits only the gain, not the whole proceeds: if you buy at €10,000 and sell at €15,000, the €5,000 gain is taxed.
How is the capital gain calculated?
Sale price minus purchase price, minus transaction costs. The result, if positive, is the taxable gain; if negative, it is a capital loss that generates no tax but can be offset in the future.
What is the capital gains rate?
It varies by country and asset type. In Italy financial returns are at 26% (12.5% for government bonds). The calculator does not assume a country: you enter the correct rate for your situation.
What are prior capital losses?
They are losses realised in the past and still offsettable. Subtracting them from the gain reduces the taxable amount and therefore the tax. Carry-forward rules vary by country (in Italy, up to the fourth following year).
Can I offset gains and losses?
Yes, it is offsetting (tax-loss harvesting): realised losses reduce taxable gains. Realising a loss on an underwater investment can legally reduce the overall tax for the year.
Do cryptocurrencies pay capital gains tax?
In many countries yes, often as financial returns and with exemption thresholds. Even converting one crypto into another can be a taxable event. Enter the rate your jurisdiction sets for crypto assets.
Can transaction costs be deducted?
Yes, buying and selling fees are subtracted from the gain, reducing the taxable amount. Entering them in the calculator makes the tax estimate more accurate.
What changes between short and long term?
In some countries (e.g. the US) long-term gains are taxed less than short-term ones. In Italy the rate is fixed regardless of duration. If duration matters in your country, use the right rate.
Do I pay tax if I do not sell?
Generally no: capital gains tax applies at realisation, that is at sale. The "paper" gains of an unsold investment are not taxed, except under particular regimes such as managed savings.
What is the net return?
It is the net gain (after tax) relative to the invested capital, as a percentage. It shows the investment's real performance after tax, the most useful number to compare different opportunities.
Does real estate pay the same tax?
Often not: real estate has its own rules and exemptions (e.g. primary home, years of ownership). This calculator is general: for real estate enter the rate and specific conditions of your country.
Can I use it for my tax return?
It is an estimation and planning tool, it does not replace the tax return or a professional's advice. Use it to understand the order of magnitude of the tax and to plan sales.
How can I legally reduce the tax?
By offsetting losses, using exemption thresholds, waiting for the long term where the rate is lower, using tax-efficient vehicles and spreading sales over several years. The calculator quantifies the effect of each choice.
Does it work for any currency?
Yes, the calculation is universal and uses the values in your currency. Enter your country's rate; only the currency symbol changes, the calculation logic stays the same.
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!