Comprehensive Guide
Learn more in our Personal Finance Guide.
How it works
capital gains tax calculator takes your inputs and produces capital gain, capital gains tax, niit surcharge, net proceeds, tax rate applied. Estimate the tax on selling investments: long-term brackets, the short-term rate, and the Net Investment Income Tax surcharge. You provide 4 inputs: Sale price (currency, in dollars) (default: 25000 dollars); Cost basis (currency, in dollars) (default: 15000 dollars); Holding period (years, in years) (default: 3 years); Your annual income (currency, in dollars) (default: 80000 dollars). The calculator returns 5 outputs: Capital gain (a secondary output); Capital gains tax (the primary result); NIIT surcharge (a supplementary figure); Net proceeds (a secondary output); Tax rate applied (a supplementary figure). Personal finance decisions trade off today's comfort against tomorrow's security. The numbers behind that trade-off — how much to save, spend, borrow, or insure — are what this calculator makes concrete. Rather than rules of thumb, it gives you the actual arithmetic for your situation so you can compare options side by side and decide with confidence. The underlying formula: Gain = Sale - cost basis | Long-term rate by income: 0% / 15% / 20% | +3.8% NIIT above $200k With the default values, capital gains tax is computed from the interaction of every input field — change any one of them and the result updates immediately, so you can stress-test different scenarios without re-entering the whole form. Adjust the inputs to match your real financial situation. The defaults are realistic starting points, but every person's circumstances differ — your actual income, expenses, rates, and timelines will produce a different answer. Use the tool iteratively: start with the defaults, then change one variable at a time to see which factor has the largest impact on your outcome.Formula
Gain = Sale - cost basis | Long-term rate by income: 0% / 15% / 20% | +3.8% NIIT above $200k
Tips
- Time sales carefully: selling just past one year moves a gain from ordinary rates to long-term rates.
- Harvest losses to offset gains — losses beyond gains offset up to $3,000 of ordinary income.
- Check your bracket first: getting pushed into the 20% zone by a big sale changes the deal.
- Gifted and inherited shares carry different basis rules — verify before selling.