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%
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.
Related calculators
ROI Calculator
Measure the return on any investment: total gain, total return (ROI), and the annualized return (CAGR) that lets you compare deals held for different lengths of time.
Real Rate of Return Calculator
Find your real, inflation-adjusted return — what your investment actually gained in purchasing power — using the exact Fisher equation, not just subtraction.
Stock Average Calculator
Averaging down on a stock? Enter two purchases to see your new average cost per share, total shares, and total invested — your blended cost basis.
Federal Income Tax Calculator
Estimate your 2026 federal income tax: total tax, effective and marginal rates, and a bracket-by-bracket breakdown using official IRS figures.
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.