Capital Gains Tax Calculator (US)
Use this US capital gains tax calculator to estimate gain, tax, and after-tax profit from cost basis, sale price, selling costs, holding period, and an entered tax rate. It is a single-scenario estimator rather than a full Form 8949 or portfolio-lot calculator, so pair it with stock profit, net investment income tax, or estimated tax when those questions are more specific. This calculator auto-updates when values change.
US capital gains details
This calculator auto-updates when values change.
This calculator provides a simplified US tax estimate only. Actual tax treatment may vary based on filing status, income, deductions, credits, state rules, local rules, transaction type, and IRS guidance. Results are for informational purposes only and are not tax advice.
Results
Results update automatically.
Capital gain
$5,000.00
You have a long-term capital gain of $5,000.00. At the entered tax rate, estimated tax is $750.00.
Visual breakdown
US capital gains tax basics
This US capital gains tax calculator estimates tax on the gain from selling assets such as stocks, crypto, funds, property, or other investments.
The taxable amount is usually based on the gain, not the full sale price. The gain is the sale proceeds minus cost basis and relevant costs. Holding period can matter because short-term and long-term gains are often treated differently.
It is designed for planning and comparison only. Actual tax can vary by state, filing status, income level, asset type, losses, exemptions, deductions, and IRS rules.
US Capital Gains Tax Example
Suppose you bought shares for $20,000 and later sold them for $32,000. Before costs, the gain is $12,000. If selling fees were $500, the net gain falls to $11,500.
If the applicable tax rate is 15%, estimated federal capital gains tax would be $1,725. If state tax or the net investment income tax applies, the total tax could be higher.
Planning Points Before Selling
Timing can matter. Selling just before or after a holding-period threshold, income change, or tax-year boundary can affect the rate or the ability to offset gains with losses.
Also check whether you have capital losses available. Losses may reduce taxable gains, but the rules and limits depend on your wider tax position.
Cost Basis Details to Gather
Before estimating tax, collect purchase price, sale price, fees, reinvested dividends, improvements, previous partial sales, and any adjustments reported by your broker or records.
For property, crypto, inherited assets, gifts, and employee stock, basis can be more complicated. A small basis mistake can materially change the taxable gain.
Using this US capital gains estimate
Use this calculator for a single US capital gains scenario where you know purchase price or cost basis, sale price, selling costs, holding period, and the tax rate you want to test.
The component does not derive the correct federal rate from income brackets. It applies the entered estimated capital gains tax rate to positive taxable gain.
Use stock profit when the question is pre-tax trade profit after buy and sell fees, and use this page when the question becomes US capital gains tax.
Use crypto tax for crypto-specific single-transaction wording, and net investment income tax when MAGI may trigger the extra 3.8% NIIT layer.
Label saved scenarios with the holding period and tax rate used so short-term, long-term, state-tax, and NIIT assumptions do not get mixed.
Common mistakes when estimating US capital gains tax
Entering sale price as the gain. The calculator subtracts cost basis and selling costs before applying the tax rate.
Treating the holding-period selector as if it chooses the tax rate. The tax rate is still the manual rate you enter.
Forgetting state tax, NIIT, loss carryovers, wash-sale adjustments, installment sales, home-sale exclusions, or basis adjustments.
Using this page for a whole portfolio with many lots and cost-basis methods. It is a single-scenario estimator.
Assuming a loss creates a tax benefit here. The component floors taxable gain at zero and does not model loss offsets.
Worked example: US capital gains tax
Example: enter a $10,000 cost basis, $15,000 sale price, $0 selling costs, long-term holding period, and a 15% estimated tax rate.
The calculator shows a $5,000 capital gain, applies the entered rate to the positive gain, and displays estimated tax plus after-tax profit.
Add selling costs if brokerage, legal, or transaction fees should reduce net sale proceeds in the scenario.
Change the entered tax rate only after deciding whether you are modelling short-term, long-term, state, or combined tax assumptions.
Combining with related investment tax estimates
Use net investment income tax after this page if MAGI and net investment income may trigger NIIT.
Use dividend tax for dividend income rather than sale gains.
Use estimated tax if the gain creates a payment-planning question after the annual tax estimate is known.
Use capital gains tax for UK CGT intent; this page is US-focused.
Records to check before relying on the result
Check purchase records, adjusted basis, reinvested dividends, split adjustments, sale confirmations, and selling costs.
Check whether the sale is really short-term or long-term based on exact acquisition and disposal dates.
Check whether state tax, NIIT, losses, wash-sale rules, or special asset rules need a more detailed calculation.
When to rerun this estimate
Rerun this US capital gains tax calculator when sale price, cost basis, selling costs, holding period, or estimated tax rate changes.
Recheck before selling if the holding period is close to the one-year boundary or the sale would materially change MAGI.
If this estimate differs from brokerage tax forms or tax software, trace cost basis, proceeds, fees, holding period, and tax-rate assumption separately.
Calculate US capital gain and tax
- 1
Enter purchase price / cost basis
Original cost plus improvements where applicable.
- 2
Add sale price and selling costs
Proceeds net of fees reduce the gain.
- 3
Choose holding period
Short-term gains use ordinary rates; long-term uses preferential rates in this model.
- 4
Set estimated capital gains tax rate
Review capital gain amount and estimated tax.
US capital gains tax: common questions
What is the difference between short- and long-term gains?
Assets held one year or less are generally short-term (ordinary rates). Longer holding uses long-term capital gains rates.
Does this include state tax?
No — enter a combined rate or use state tax tools separately.
How do I account for wash sales?
Wash sale rules adjust basis — this calculator uses the basis you enter.
Are home sales included?
Primary home exclusions are not modelled unless you adjust sale price or basis inputs.
Should I track lots individually?
Yes for accuracy. This tool assumes one aggregate purchase and sale.
Should I rely on this capital gains tax estimate when filing?
No. It is a simplified US capital gains estimate. Filing requires accurate basis records, transaction forms, current tax rates, state rules, loss treatment, NIIT checks, and any special asset rules.
Disclaimer: This calculator provides simplified tax estimates for education and planning only. It is not tax, legal, accounting, or financial advice. Rules change by jurisdiction, filing status, and personal circumstances — verify results with official guidance or a qualified tax professional before filing or making decisions.
