BenefitBeacon

← All tools

Capital Gains Tax Calculator

Working

When an asset is sold for more than it cost, the difference is a capital gain, and tax is due on the gain, not on the whole sale price. Day to day, a $100,000 sale with a $60,000 cost basis gives a $40,000 gain, and at a 15% rate the tax is $6,000, leaving $94,000. This calculator works out the gain, the tax, and the net proceeds from the sale price, the cost basis, and the rate you put in. It does not decide the rate, which depends on the income, the filing status, and how long the asset was held, and it doesn't cover state tax.

Illustration of rising bars and a coin, representing capital gains tax.

What this calculator does

This calculator answers how much tax is due on a capital gain. You put in the sale price, the cost basis, and the tax rate, and it works out the gain, the tax, and the net proceeds. It also explains that the cost basis is what was paid plus the costs of buying and improving the asset, and that a loss offsets a gain. It doesn't file the return or decide the rate.

How this is calculated

The gain is the sale price minus the cost basis: $100,000 minus $60,000 is $40,000. The tax is the gain times the rate: $40,000 times 15% is $6,000. The net proceeds are the sale price minus the tax: $100,000 minus $6,000 is $94,000. If the sale price is less than the cost basis, what you get is a loss, and no tax is due on the sale itself, although the loss can offset other gains. In practice, the long-term rates are 0%, 15%, and 20% for most taxpayers, and the rate depends on taxable income.

Source

Capital gains rules are published by the Internal Revenue Service at irs.gov — Capital Gains and Losses.

Limitations

It uses the rate you put in, and it doesn't decide which rate applies: the rate depends on taxable income, filing status, and whether the asset was held for more than a year. It doesn't include state tax, the net investment income tax of 3.8%, or the exclusion for a primary home, which can exclude up to $250,000 of gain for a single filer and $500,000 for a joint filer. What you get is an estimate for planning, not tax advice.

What each input means

Sale price. The amount the asset was sold for, in dollars. Cost basis. What was paid for the asset, plus the costs of buying and improving it, in dollars. Tax rate. The capital gains rate, as a percentage: 0%, 15%, or 20% for most long-term gains.

How to read your result

Read the gain first, then the tax. A $100,000 sale with a $60,000 basis gives a $40,000 gain, and at 15% the tax is $6,000, leaving $94,000. At 20% the tax is $8,000, leaving $92,000. At 0% no tax is due. The tax is on the gain only, not on the whole sale price, which is why the basis matters: a higher basis means a lower gain and a lower tax.

Worked example

Take a $100,000 sale with a $60,000 cost basis at a 15% rate. The gain is $100,000 minus $60,000, or $40,000. The tax is $40,000 times 15%, or $6,000. The net proceeds are $100,000 minus $6,000, or $94,000. Take the same sale at 20%: the tax is $8,000 and the net proceeds are $92,000. Take a sale of $50,000 with a $60,000 basis: what you get is a $10,000 loss, and no tax is due on the sale.

What to do next

Keep records of the cost basis, including the purchase price and the improvement costs, because the basis decides the gain. Check whether the home sale exclusion or the loss offset applies, and check the rate for the income level. Day to day, the federal income tax calculator can work out the overall tax, and the IRS notice explainer can explain a notice about the sale.

What to watch out for

The most common mistake with capital gains tax is forgetting the holding period. A gain on an asset held for more than a year is a long-term gain, taxed at 0%, 15%, or 20% depending on the income, while a gain on an asset held for a year or less is a short-term gain, taxed as ordinary income, which is usually higher. The second most common mistake is forgetting the basis: the gain is the sale price minus the basis, which is usually what was paid plus the improvements, and the records must show the basis. The third most common mistake is forgetting the net investment income tax of 3.8%, which applies to high incomes. Keep the purchase and sale records, because they show the dates and the amounts, and the records are needed for the tax return. Do not sell only for the tax: the investment decision should come first, and the tax second. The IRS free tax help locator on this site can find free help with the return.

Common questions

What is the cost basis?

What was paid for the asset, plus the costs of buying and improving it. It is subtracted from the sale price to get the gain.

What are the long-term rates?

0%, 15%, and 20% for most taxpayers, depending on taxable income. Short-term gains are taxed as ordinary income.

What if I sell at a loss?

No tax is due on the sale, and the loss can offset other gains, and up to $3,000 of other income a year.

Does the home sale exclusion apply?

A primary home can exclude up to $250,000 of gain for a single filer and $500,000 for a joint filer, if the ownership and use tests are met.

Is state tax included?

No. Most states also tax the gain. This tool covers the federal tax at the rate entered only.

Sources

Related guides

Official sources

Benefit rules, amounts and application steps come from the administering agency. These links open the official agency home page in a new tab. Program pages link to the agency named on the page.