Capital Gains Tax Calculator
Estimate your investment gain and the tax you might owe on short term or long term asset sales.
This calculator runs entirely in your browser. Nothing you enter is uploaded or stored.
How to use this tool
Enter the price you originally paid for the asset (your cost basis) and the price you sold it for (your proceeds). Choose whether you held the asset short term (one year or less) or long term (more than one year). For a long term sale, pick the IRS long term rate that applies to you: 0, 15, or 20 percent. For a short term sale, type the ordinary income tax rate that applies to your bracket, since short term gains are taxed as regular income. Press Calculate to see your estimated gain and the tax you might owe.
How the capital gains tax is calculated
Tax owed = Capital gain × Applicable tax rate
Net proceeds after tax = Sale price - Tax owed
A capital gain is simply the profit you make when you sell an asset for more than you paid for it. The rate you pay depends on how long you held it. Assets held for one year or less produce a short term gain, which the IRS taxes at your ordinary income rate, just like wages. Assets held for more than one year produce a long term gain, which is taxed at the lower preferential rates of 0, 15, or 20 percent, based on your taxable income. If the sale price is below your purchase price, the result is a capital loss rather than a gain, and no gains tax is owed on that sale.
A real example
Suppose you bought shares for $10,000 and later sold them for $15,000 after holding them for two years. Your capital gain is $15,000 - $10,000 = $5,000. Because you held the shares longer than a year, this is a long term gain. If your long term rate is 15 percent, the estimated tax is $5,000 × 0.15 = $750. Your net proceeds after tax would be $15,000 - $750 = $14,250. Had you instead sold after only six months and you sit in a 22 percent ordinary income bracket, the same $5,000 gain would be taxed at 22 percent, or $1,100, leaving $13,900 in net proceeds. The longer holding period saved you $350 in this case.
This is an educational estimate only. Real tax outcomes depend on your full income, filing status, deductions, state taxes, and special rules. It is not professional tax advice. Consult a qualified tax professional before making decisions.
Common questions
What is the difference between short term and long term capital gains?
The dividing line is the holding period. If you owned the asset for one year or less before selling, the profit is a short term gain taxed at your ordinary income rate. If you held it longer than one year, it is a long term gain taxed at the lower 0, 15, or 20 percent rates. This short term vs long term asset gain distinction is the single biggest factor in how much tax you owe.
Which long term capital gains rate applies to me?
The IRS sets long term rates of 0, 15, or 20 percent based on your taxable income and filing status. Lower incomes often qualify for the 0 percent rate, most middle incomes fall in the 15 percent band, and high earners reach 20 percent. Use this IRS capital gains rate tool to test each rate, then check the current IRS thresholds to see which one matches your situation.
How do I estimate my investment tax liability?
Enter your cost basis and sale price, choose your holding period, and select the matching rate. The tool subtracts your purchase price from your sale price to find the gain, then multiplies by the rate to estimate the tax. This gives you a quick way to estimate investment tax liability before you sell, though your real bill may differ once all of your income and deductions are counted.
What happens if I sold at a loss?
If your sale price is lower than your purchase price, you have a capital loss instead of a gain. This calculator will show a negative gain and zero tax owed, because losses are not taxed. In real filings, capital losses can often offset other gains and a limited amount of ordinary income, which may lower your overall tax.
Does this include state taxes or the net investment income tax?
No. This is a simplified federal estimate that applies only the rate you choose. Many states tax capital gains separately, and high earners may owe an additional net investment income tax. Because of that, treat the result as an educational starting point, not a final tax figure, and confirm details with a tax professional.