Capital Gains Tax Calculator (USA)
Use GlobalCalqulate’s free Capital Gains Tax Calculator (USA, 2026) to estimate taxes on profits from selling stocks, ETFs, crypto, and real estate. Compare short-term vs long-term capital gains tax, enter purchase price (cost basis), sale price, holding period, and income level to estimate tax owed and after-tax profit. Helpful for investment planning, tax-loss harvesting decisions, and smarter sell timing.
Last revised
By Team GlobalCalqulate · About our editorial standards
Understanding Capital Gains Tax
Capital gains tax is owed when you sell an investment (stocks, real estate, crypto) for more than its purchase price. The profit (gain) is classified as either short-term (held 1 year or less, taxed as ordinary income) or long-term (held more than 1 year, taxed at preferential rates). Long-term capital gains rates are typically 0%, 15%, or 20% depending on income level, compared to ordinary income rates up to 37%.
Smart investors use tax strategies like holding investments 1+ years to qualify for long-term rates, harvesting losses to offset gains, and timing sales strategically. Special rules apply to specific assets: primary residences get $250k/$500k exclusions per person, while collectibles face different rates. Understanding your basis (original cost) and holding period is critical for accurate tax calculation.
Capital Gains Tax Formula
Capital Gain = Sale Price - Cost Basis Tax Owed = Capital Gain x Tax Rate Long-term Tax: 0% (above $44k single), 15% ($44k-$492k), 20% (above $492k) Short-term Tax: Same as ordinary income brackets (up to 37%)
Cost basis includes purchase price plus improvements. Long-term rates apply to assets held more than 1 year. Tax brackets change annually; rates above are 2024 approximations.
Key Terms & Definitions
Cost Basis
Original purchase price plus improvements; used to calculate gain
Long-Term Gain
Assets held more than 1 year, taxed at preferential rates (0/15/20%)
Short-Term Gain
Assets held 1 year or less, taxed as ordinary income (up to 37%)
Tax-Loss Harvesting
Selling losing investments to offset capital gains
Wash Sale
Selling at loss then buying same/similar asset within 30 days; disallowed
Adjusted Gross Income (AGI)
Income threshold determining long-term capital gains rate
Capital Gains Tax Strategies
- ✓Hold investments 1+ years to qualify for long-term rates (0-20% vs. up to 37%)
- ✓Practice tax-loss harvesting: sell losing investments to offset gains
- ✓Time large sales across tax years to stay in lower tax brackets
- ✓Understand basis: track original cost plus any improvements for accurate calculations
- ✓Avoid wash sales: don't repurchase similar assets within 30 days of loss sales
- ✓Consider charitable donations of appreciated assets instead of selling to avoid tax
Frequently Asked Questions
Clear answers to common questions to help you use this calculator confidently.
Is my long-term capital gains rate based on my total income or just the gain?
Tap to view the answer
Is my long-term capital gains rate based on my total income or just the gain?
Tap to view the answer
Your gain stacks on top of your other taxable income, not the other way around. The 0%/15%/20% thresholds are measured on taxable income including the gain, so if your income plus gain crosses a threshold, part of the gain is taxed at one rate and the rest at the next rate — it is not one flat rate applied to the whole gain. This calculator's federal tax figure reflects that split automatically; the 'Federal Rate Applied' line shows when a gain is split across bands.
How does the holding period affect my tax rate?
Tap to view the answer
How does the holding period affect my tax rate?
Tap to view the answer
Assets held for more than one year qualify for long-term capital gains treatment, which is taxed at preferential rates of 0%, 15%, or 20% depending on income. Assets held one year or less are taxed as short-term gains at ordinary income tax rates, which are typically much higher.
Does this calculator work for real estate sales?
Tap to view the answer
Does this calculator work for real estate sales?
Tap to view the answer
Yes, you can estimate taxes on property sales. Keep in mind that a primary residence may qualify for a $250,000 (single) or $500,000 (married filing jointly) exclusion if you owned and lived in it for at least 2 of the last 5 years — this calculator does not automatically apply that exclusion, so subtract it from your gain manually if it applies.
How do transaction costs affect my taxable gain?
Tap to view the answer
How do transaction costs affect my taxable gain?
Tap to view the answer
Buying and selling costs, such as brokerage fees or closing costs, can be added to your cost basis or subtracted from your sale price, which reduces the taxable gain. Include these amounts in your purchase or sale price inputs for a more accurate estimate.
Does this calculator include state capital gains taxes?
Tap to view the answer
Does this calculator include state capital gains taxes?
Tap to view the answer
It focuses primarily on federal capital gains tax, with an optional state tax rate input you can set yourself. State rules vary significantly — some states, like Texas, have no capital gains tax, while others tax gains as ordinary income.
How does the Net Investment Income Tax (NIIT) get calculated here?
Tap to view the answer
How does the Net Investment Income Tax (NIIT) get calculated here?
Tap to view the answer
If your modified adjusted gross income (income plus the gain) exceeds $200,000 (single/head of household), $250,000 (married filing jointly), or $125,000 (married filing separately), the calculator applies the 3.8% NIIT — but only on the lesser of your net investment income or the amount your MAGI exceeds the threshold, not on the entire gain. That is why someone just over the threshold sees a small NIIT charge rather than 3.8% of the whole sale.
Need more help? Contact support or email globalcalqulate@gmail.com
We typically reply within 24–48 hours.
How this capital gains tax calculator works
The calculator estimates US federal capital gains tax using either the short-term (ordinary income) or long-term (0 %, 15 % or 20 %) rate. It optionally adds the 3.8 % Net Investment Income Tax (NIIT) for high earners introduced under the Affordable Care Act.
- Classify the gain as short-term (held ≤12 months) or long-term (held >12 months).
- Apply the applicable 2026 long-term rate based on taxable income and filing status: 0 %, 15 % or 20 %.
- Add the 3.8 % NIIT if modified AGI exceeds the threshold ($200k single / $250k MFJ).
- Show the all-in effective rate on the gain and the net after-tax proceeds.
State capital gains taxes and depreciation recapture are not included. Consult a tax professional for investment decisions.
Related calculators
- Income Tax Calculator
- Investment Return Calculator
- Dividend Calculator
- 1099 Tax Calculator
- Self-Employment Tax Calculator
- Tax Refund Calculator
More United States calculators
Popular US Calculators
Free tools for every financial decision