Advertisement

Capital Gains Tax Calculator — 2024 Short & Long-Term Rates

Calculate federal capital gains tax on stocks, real estate, crypto, and other assets. See short-term vs long-term rates, NIIT surcharge, and estimated tax owed for 2024.

Taxing business net income, not an asset sale?

This page estimates tax on capital gains from selling investments or property. For C-corp, S-corp, and LLC corporate income tax, use the Corporate Tax Calculator →

What is Capital Gains Tax?

Capital gains tax applies to profit when you sell an asset for more than your cost basis — stocks, ETFs, real estate, crypto, collectibles, and business interests. Short-term gains (held ≤1 year) are taxed as ordinary income; long-term gains (held >1 year) qualify for preferential 0%, 15%, or 20% federal rates.

Use this page when estimating tax on a specific sale: enter purchase price, sale price, holding period, filing status, and taxable income to see short- vs long-term treatment and optional 3.8% Net Investment Income Tax (NIIT) above income thresholds.

Corporate tax is different — it taxes a C-corporation’s annual net business income at a flat 21% federal rate, with pass-through options for S-corps and LLCs. For entity-level business income tax, use the Corporate Tax Calculator.

How the Capital Gains Tax Calculator Works

Formula, assumptions, and calculation steps for this tax tool.

Formula Used

Tax = (Sale Price - Cost Basis) x Capital Gains Rate, short or long term

Methodology

Subtracts the original cost basis from the sale price to find the gain, then applies the short or long-term rate based on holding period.

Calculation Steps

  1. Enter taxable amounts and any deductions or allowances.
  2. Apply the relevant brackets, rates, or tax percentage.
  3. Calculate gross tax, credits, or net amount where supported.
  4. Show totals for planning and comparison.

Assumptions and Limits

  • Tax rules change by jurisdiction and year.
  • Local surcharges, credits, and filing status details may not be exhaustive.
  • Consult a tax professional for filing decisions.

Frequently Asked Questions

Short-term capital gains (assets held 1 year or less) are taxed as ordinary income at your regular tax bracket rate (up to 37%). Long-term capital gains (assets held more than 1 year) are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. Holding an asset for at least one year and one day can significantly reduce your tax burden.

Yes. The IRS treats cryptocurrency as property, not currency. Buying and selling crypto triggers capital gains tax. Short-term crypto gains (held under 1 year) are taxed as ordinary income. Long-term crypto gains (held over 1 year) get preferential 0%, 15%, or 20% rates. Mining, staking rewards, and crypto received as payment are taxed as ordinary income.

High-income taxpayers may owe an additional 3.8% Net Investment Income Tax on capital gains. For 2024, this applies to single filers with income above $200,000 and married filing jointly above $250,000. This means some taxpayers effectively pay 23.8% on long-term gains instead of 20%.

Yes. Capital losses offset capital gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 of net capital losses against ordinary income per year. Additional losses carry forward to future tax years indefinitely. This strategy is called tax-loss harvesting and is commonly used in portfolio management.

Real-World Applications

📈
Stock Portfolio Management
Investors calculate the after-tax proceeds of selling appreciated positions — and model the benefit of holding past the 12-month threshold to qualify for long-term rates before placing a sell order.
🏠
Real Estate Sales
Homeowners calculate CGT on investment property sales, factoring in the cost basis adjustments from capital improvements, depreciation recapture (Section 1250), and the $250K/$500K primary residence exclusion.
Cryptocurrency
Crypto investors calculate CGT for every taxable event — selling, swapping, or spending coins — as the IRS treats each as a disposition subject to either short-term or long-term CGT.
💼
Business Exit Planning
Business owners use CGT modelling before selling a company to compare asset sales versus stock sales, evaluate Qualified Small Business Stock (QSBS) exclusions, and plan Opportunity Zone reinvestment.
🌾
Tax-Loss Harvesting
Portfolio managers intentionally sell underperforming positions to realise capital losses that offset gains, reducing the overall CGT bill — a strategy commonly executed in Q4 each year.
🎁
Estate & Gift Planning
Estate planners calculate the embedded CGT in appreciated assets when advising on gifting versus holding to death — inheritors receive a stepped-up cost basis, potentially eliminating CGT entirely.

Common Mistakes

1
Forgetting the Wash Sale Rule
If you sell a stock at a loss and repurchase the same or substantially identical security within 30 days before or after the sale, the IRS disallows the capital loss deduction. The disallowed loss is added to the cost basis of the repurchased shares.
2
Ignoring the Net Investment Income Tax
High-income taxpayers owe an additional 3.8% NIIT on top of the standard long-term CGT rate. For single filers with income above $200K, the effective maximum rate on long-term gains is 23.8%, not 20%.
3
Miscalculating the Cost Basis
For stocks purchased in multiple lots, your cost basis method (FIFO, LIFO, specific identification, average cost) significantly affects your CGT bill. Many investors default to FIFO without realising specific identification would produce a lower taxable gain.
4
Missing the Holding Period Cutoff by a Day
The long-term threshold is more than 12 months — specifically, at least 366 days. Selling exactly one year after purchase (365 days) triggers short-term rates. One additional day can make a large difference on a substantial gain.
5
Not Accounting for State Capital Gains Tax
Most US states tax capital gains as ordinary income, adding 3–13% on top of the federal rate. California (up to 13.3%), New York (up to 10.9%), and other high-tax states significantly increase the total tax burden on gains.

2024 US Capital Gains Tax Rates by Filing Status

Rate Single Married Filing Jointly Head of Household
0% ≤ $47,025 ≤ $94,050 ≤ $63,000
15% $47,026–$518,900 $94,051–$583,750 $63,001–$551,350
20% > $518,900 > $583,750 > $551,350
23.8% (+ NIIT) > $200,000 (single) > $250,000 (MFJ) Varies

References

  1. Internal Revenue Service. Topic No. 409 — Capital Gains and Losses. irs.gov.
  2. Internal Revenue Service. Publication 550 — Investment Income and Expenses. irs.gov.
  3. Tax Policy Center. Taxation of Capital Gains. taxpolicycenter.org.
  4. Brealey, R. A., Myers, S. C. & Allen, F. Principles of Corporate Finance, 13th ed. McGraw-Hill, 2020.
  5. Pomerleau, K. A Primer on Capital Gains Taxes. Tax Foundation, 2019.