Capital Gains Tax Calculator
Estimate federal capital gains tax from purchase price, sale price, and holding period.
Returns short vs long-term rate and net proceeds for 2024 brackets.
Capital gains tax applies when you sell an asset for more than you paid for it. The U.S. tax system distinguishes between short-term and long-term gains — holding an asset for more than one year usually results in a dramatically lower tax rate.
Formula: Capital Gain = Sale Price − Cost Basis Tax Owed = Capital Gain × Applicable Tax Rate
Cost basis = purchase price + commissions/fees + improvement costs (for real estate)
U.S. tax rates (2024, single filer):
Short-term (held ≤ 1 year): taxed as ordinary income
- 10%: $0–$11,600
- 12%: $11,601–$47,150
- 22%: $47,151–$100,525
- 24%: $100,526–$191,950
- 32%: $191,951–$243,725
- 35%: $243,726–$609,350
- 37%: over $609,350
Long-term (held > 1 year):
- 0%: taxable income under $47,025
- 15%: $47,025–$518,900
- 20%: over $518,900
Worked example: Bought stock for $8,000, sold 18 months later for $14,500. Single filer, $70,000 total income.
Capital gain = $14,500 − $8,000 = $6,500 Rate = 15% (long-term, income $70,000) Tax owed = $6,500 × 0.15 = $975
If held for only 9 months (short-term, 22% bracket): Tax owed = $6,500 × 0.22 = $1,430 — $455 more for selling too early.
Tax-loss harvesting: Selling losing investments can offset capital gains dollar-for-dollar. Losses exceeding gains can offset up to $3,000 of ordinary income per year, with the remainder carried forward.