Capital Gains Calculator

Investment tax estimator

Investment Details
Tax Summary
Capital Gain
$0.00
Tax Rate: 15%
Estimated Tax: $0.00
After-Tax Proceeds: $0.00
Purchase: $0.00
Sale: $0.00

What is a Capital Gains Calculator?

A Capital Gains Calculator estimates the tax you'll owe when selling investments like stocks, bonds, or real estate for a profit. It distinguishes between short-term gains (held less than one year) taxed as ordinary income and long-term gains (held more than one year) taxed at preferential rates.

This tool helps you plan the timing of sales to optimize tax rates, estimate after-tax proceeds, and make informed decisions about holding periods. Understanding capital gains tax is essential for maximizing after-tax investment returns.

How to Use This Calculator

Step 1: Enter your original purchase price (cost basis).
Step 2: Input the sale price of your investment.
Step 3: Select holding period—long-term or short-term.
Step 4: Enter your applicable tax rate.
Step 5: Click "Calculate Tax" to see estimated tax liability.
Step 6: Review after-tax proceeds to understand net gain.

Capital Gains Examples

Example 1 - Long-Term Gain: Bought stock for $10,000, sold 2 years later for $18,000. Gain: $8,000. Tax rate: 15%. Tax: $1,200. After-tax proceeds: $16,800. If sold after 11 months (short-term), tax would be ~$1,760 at 22% rate—holding one extra month saved $560.

Example 2 - 0% Rate: Married couple with $75,000 taxable income sells stock with $5,000 gain held 3 years. Their income is below $94,050 threshold. Tax rate: 0%. Tax: $0. This demonstrates the power of staying in the 0% bracket for long-term gains.

Example 3 - High Earner: Single filer with $500,000 income sells investment with $100,000 gain held 5 years. Long-term rate: 20%. Plus 3.8% Net Investment Income Tax = $3,800. Total tax: $23,800. Combined rate: 23.8% effective.

Who Should Use This Calculator?

Investors planning to sell appreciated stocks should use this calculator to estimate tax consequences before executing trades. This helps decide whether to hold for long-term treatment or sell now.

Tax planners use capital gains analysis for year-end tax planning. Harvesting losses, timing charitable giving of appreciated securities, and managing income levels to stay within favorable brackets are all strategies that require accurate tax calculations.

Real estate investors considering property sales need capital gains estimates to evaluate whether to sell or exchange via 1031 exchange. Primary home sales may qualify for exclusion ($250,000 single, $500,000 married).

Capital Gains Strategies & Pro Tips

  • Hold for 1 Year: Long-term gains taxed at 0%, 15%, or 20% vs ordinary income rates up to 37%
  • Tax-Loss Harvesting: Sell losers to offset gains; up to $3,000 can offset ordinary income
  • 0% Rate Opportunity: Lower-income years may qualify for 0% long-term capital gains rate
  • Wash Sale Rule: Can't claim loss if repurchasing same security within 30 days
  • Charitable Giving: Donate appreciated securities instead of cash for full deduction without capital gains
  • Step-Up Basis: Inherited assets receive stepped-up basis to date of death
  • Primary Home Exclusion: $250,000 ($500,000 married) exclusion if lived in home 2 of last 5 years
  • Qualified Small Business: Section 1202 exclusion may eliminate tax on qualified stock gains

Frequently Asked Questions

What is the difference between short-term and long-term capital gains?
Short-term: Assets held less than 1 year, taxed as ordinary income (10-37% federal). Long-term: Assets held more than 1 year, taxed at preferential rates (0%, 15%, or 20%). The 1-year threshold is critical. Example: Sell at 11 months = short-term at your tax bracket (say 24%). Sell at 13 months = long-term at 15%. On $10,000 gain, difference is $900 in tax. Always check holding period before selling appreciated assets.
What are the 2024 long-term capital gains tax rates?
2024 Long-term capital gains rates by taxable income: 0% rate: Single up to $47,025; Married up to $94,050; HOH up to $63,000. 15% rate: Single $47,026-$518,900; Married $94,051-$583,750; HOH $63,001-$551,350. 20% rate: Above those 15% thresholds. Additional 3.8% Net Investment Income Tax applies to investment income for singles over $200,000 and married over $250,000. State taxes may also apply (0-13.3% depending on state).
How do I calculate my cost basis?
Cost basis is generally what you paid for the asset including commissions and fees. For stocks: Purchase price Ă— shares + commissions. Corporate actions affect basis: Stock splits divide basis (2:1 split halves per-share basis), Mergers may exchange shares at specific ratio. Inherited property: Stepped-up basis to fair market value at date of death. Gifted property: Carryover basis from donor.
Can I avoid capital gains tax?
Legal strategies to reduce/avoid capital gains: 1) Hold assets >1 year for lower rates, 2) Use tax-advantaged accounts (401k, IRA, Roth, 529, HSA), 3) Tax-loss harvesting to offset gains, 4) Donate appreciated securities to charity, 5) Gift appreciated assets to family in lower brackets, 6) Primary home exclusion for residences, 7) Opportunity Zone investments for deferral, 8) 1031 exchanges for real estate, 9) Qualified Small Business Stock exclusion, 10) Step-up basis planning (hold until death for heirs).
What is tax-loss harvesting?
Strategy of selling losing investments to realize capital losses that offset capital gains, reducing tax liability. Rules: Losses offset gains dollar-for-dollar. If losses exceed gains, up to $3,000 can offset ordinary income annually ($1,500 if married filing separately). Unused losses carry forward indefinitely. Wash sale rule: Can't claim loss if you buy same or "substantially identical" security within 30 days before or after sale.
Do I pay capital gains tax on my primary home?
Primary residence exclusion: Up to $250,000 gain ($500,000 married filing jointly) is tax-free if you: Owned the home at least 2 years, Lived in it as primary residence at least 2 of last 5 years, Haven't claimed exclusion on another home in past 2 years. Gains above exclusion limit are taxed at capital gains rates. Exclusion applies to both federal and most state taxes.
What is depreciation recapture?
When you sell rental property, depreciation you claimed over the years must be "recaptured" and taxed. Rate: 25% maximum on recaptured depreciation (could be lower if in lower bracket). Example: Bought rental for $200,000, claimed $50,000 depreciation over 10 years. Adjusted basis = $150,000. Sell for $250,000. Total gain = $100,000. Depreciation recapture = $50,000 taxed at 25% = $12,500. Remaining $50,000 gain taxed at long-term capital gains rates.
How do I report capital gains?
Report capital gains on Schedule D (Capital Gains and Losses) attached to Form 1040. Process: Brokers send Form 1099-B showing proceeds and basis. Use Form 8949 to list each transaction, then summarize on Schedule D. Separate short-term and long-term transactions. Short-term on Part I, Long-term on Part II. Carryover losses from prior years also reported.
What is the 3.8% Net Investment Income Tax?
Additional 3.8% tax on net investment income for high earners. Applies if: Modified AGI exceeds $200,000 (single) or $250,000 (married). Applies to: Interest, dividends, capital gains, rental income, royalty income, passive business income. Does NOT apply to: Wages, self-employment income, active business income, tax-exempt interest, retirement plan distributions.
How do Opportunity Zones work for capital gains?
Opportunity Zones are economically distressed areas where investments receive tax benefits. Defer capital gains by investing in Qualified Opportunity Fund (QOF) within 180 days of sale. Benefits: Defer tax on original gain until 2026 or earlier sale, 10% step-up in basis if held 5 years, 15% step-up if held 7 years, Zero tax on new OZ investment gains if held 10+ years.