DayCents

Taxes

Capital Gains Tax Calculator

Holding an asset for more than a year usually changes its tax rate, not just its return. Long-term gains are taxed at 0%, 15%, or 20% for most people; sell a day early and the whole gain is taxed as ordinary income.

What you paid, including commissions and fees.

Estimated tax owed

$3,000

Federal capital gains tax at the rate you selected.

Capital gain
$20,000
You keep
$67,000
Tax as a share of the gain
15%
Your gain$20K
You keep$17,00085%
Tax$3,00015%

How this calculator works

Gain = sale price − cost basis. Tax = gain × the rate you select, and nothing is owed on a loss. The effective rate divides tax by the gain, and 'you keep' is the sale price less the tax.

Federal only, with a single flat rate you choose — real liability depends on your total income, filing status, state, and the 3.8% net investment income tax. It also does not model losses carried forward or the primary-residence exclusion, which shelters up to $250,000 of gain ($500,000 married) on a home you lived in.

Try an example

Frequently asked questions

What's the difference between short-term and long-term gains?

The holding period. Sell an asset you have owned a year or less and the gain is short-term, taxed at your ordinary income rate — up to 37%. Hold longer than a year and it becomes long-term, taxed at 0%, 15%, or 20% depending on income. Waiting a few extra days can be the highest-paid decision of the year.

What is cost basis?

What you paid, adjusted — purchase price plus commissions and fees, and for property, plus capital improvements. A higher basis means a smaller taxable gain, which is why keeping records of improvements and reinvested dividends matters. Brokerages track basis for most securities.

Do I owe state tax too?

Usually. Most states tax capital gains as ordinary income, and a handful do not tax income at all. This calculator covers the federal portion only, so add your state rate for the full picture — our state income tax pages list them.

What about the 3.8% net investment income tax?

It applies on top of the rates above once modified adjusted gross income passes $200,000 single or $250,000 married filing jointly. It is not included here; if you are near those thresholds, add it to the rate you select or ask a tax professional.

Can I use losses to reduce the tax?

Yes. Capital losses offset capital gains dollar for dollar, and up to $3,000 of leftover loss can offset ordinary income each year, with the rest carried forward. Deliberately realising losses to offset gains is called tax-loss harvesting — watch the 30-day wash-sale rule.

Disclaimer: DayCents provides this calculator for educational purposes only. Results are estimates based on your inputs and the stated assumptions — they are not financial advice, a quote, or an offer of credit. Consult a qualified financial professional before making major money decisions.