Capital Gains Tax Calculator

Popular
Reviewed by Finance Team

Calculate tax on investment gains. Compare short-term vs long-term rates and see your net proceeds after tax.

Last updated: 2026

Investment Details

$
$

Capital Gain

$15,000

✓ Long-term (lower tax)

months

Used to determine tax bracket

$
%

Net Proceeds After Tax

$22,000

20% effective tax rate

Long-Term Capital Gain

Held for 1 year, 6 months

Gain Breakdown

Cost Basis$10,000
Sale Proceeds$25,000
Capital Gain$15,000

Tax Breakdown

Federal Tax (15%)$2,250
State Tax$750
Total Tax$3,000

Saved by holding long-term:

$1,050

Short-term would have cost $4,050 in tax

Summary

Sale Proceeds$25,000
Total Tax$3,000
Net Proceeds$22,000
Effective Rate20%

The Hidden Tax That Destroys Investment Returns

Capital gains tax can consume 15-37% of your investment profits—often the difference between a comfortable retirement and a precarious one. Yet many investors make costly timing errors, triggering unnecessary taxes that compound over decades.

The Failure State

Selling a stock at $50,000 profit after 11 months instead of 13 months could cost you $7,000+ in additional taxes (24% ordinary income vs 15% long-term rate). Over a 30-year investing career, such mistakes—repeated—can erode hundreds of thousands in wealth. Understanding capital gains timing and tax-loss harvesting is not optional for serious investors.

This calculator helps you estimate your capital gains tax liability, compare short-term vs. long-term treatment, and plan sales to minimize your tax burden legally.

Interpreting Your Results

Your capital gains tax depends on three factors: holding period,income level, and asset type. The interaction of these factors creates significant planning opportunities.

Quick Reference: 2025 Long-Term Rates

0%: Single filers below $48,350 | Married filing jointly below $96,700
15%: Single $48,350-$533,400 | Married $96,700-$600,050
20%: Above these thresholds
+3.8%: Net Investment Income Tax if MAGI exceeds $200K/$250K

Sensitivity Analysis: Timing Matters

The following table demonstrates how holding period and income level dramatically affect your tax on the same $50,000 gain:

ScenarioTax RateTax OwedNet Gain
Short-term, 22% bracket22%$11,000$39,000
Short-term, 32% bracket32%$16,000$34,000
Long-term, 0% bracket0%$0$50,000
Long-term, 15% bracket15%$7,500$42,500
Long-term, 20% + NIIT23.8%$11,900$38,100

Tax on $50,000 capital gain under various scenarios

The tax alpha from proper timing is extraordinary: a taxpayer in the 0% long-term bracket keeps 100% of their gain, while the same gain sold short-term by a high earner costs 32%+.

The 0% Rate Opportunity

Many investors don't realize there's a 0% capital gains rate for lower income levels. Strategic use includes:

  • Selling gains in early retirement before Social Security and RMDs begin
  • Realizing gains in sabbatical or low-income transition years
  • Having lower-income spouse sell appreciated assets
  • Gifting appreciated stock to children in 0% bracket (then they sell)

The Mathematics of Capital Gains

Capital gains tax is calculated as the difference between your sales proceedsand your cost basis, multiplied by the applicable tax rate:

Core Formula

Capital Gain = Sale Price - Cost Basis - Selling Expenses

Tax Owed = Capital Gain × Applicable Tax Rate

Your cost basis includes the original purchase price plus any reinvested dividends (in a DRIP), stock splits, adjustments for corporate actions, and transaction fees. Maintaining accurate basis records is critical.

Cost Basis Methods

When selling partial positions, you can choose which shares to sell. Per IRS rules:

MethodHow It WorksBest For
FIFO (First In, First Out)Sells oldest shares firstDefault if no specification
Specific IdentificationYou choose which lots to sellMaximizing tax efficiency
Average CostAverages basis of all sharesMutual funds only

Specific Identification

Always use specific lot identification to sell high-basis shares first (minimizing gain) or low-basis shares strategically (when you have offsetting losses). Inform your broker before the sale.

2025 Capital Gains Tax Brackets

Per IRS Topic 409, long-term capital gains rates for 2025 are:

RateSingle FilersMarried Filing JointlyHead of Household
0%$0 - $48,350$0 - $96,700$0 - $64,750
15%$48,351 - $533,400$96,701 - $600,050$64,751 - $566,700
20%Over $533,400Over $600,050Over $566,700

Net Investment Income Tax

High earners also pay the 3.8% NIIT on the lesser of net investment income or the amount by which modified AGI exceeds $200,000 (single) or $250,000 (married). This creates an effective maximum rate of 23.8% on long-term gains for the highest earners.

Special Asset Categories

Asset TypeMaximum Long-Term RateNotes
Stocks, ETFs, Bonds20% (+3.8% NIIT)Standard treatment
Collectibles28%Art, coins, antiques, precious metals
Qualified Small Business Stock0-28%Section 1202 exclusion possible
Real Estate25% (recapture) + 20%Depreciation recaptured at 25%
Cryptocurrency20% (+3.8% NIIT)Treated as property

Tax-Loss Harvesting

Tax-loss harvesting is the practice of selling losing investments to offset capital gains, reducing your tax liability. The strategy has specific rules:

  • Capital losses first offset capital gains dollar-for-dollar
  • Short-term losses offset short-term gains first (most valuable)
  • Excess losses offset up to $3,000 of ordinary income per year
  • Remaining losses carry forward indefinitely to future years

Wash Sale Rule

You cannot claim a loss if you buy the same or "substantially identical" security within 30 days before or after the sale. The rule applies across all your accounts, including IRAs. To harvest a loss while maintaining exposure, switch to a similar (but not identical) investment.

Year-End Planning

Review your portfolio in November/December. Harvest losses to offset realized gains. If gains exceed losses, consider whether any positions worth selling at a loss to reduce your tax bill.

Strategic Planning Techniques

  1. Hold investments at least one year and one day for long-term treatment
  2. Use tax-advantaged accounts (IRA, 401k, HSA) for high-turnover strategies
  3. Donate appreciated assets to charity (avoid gains, get deduction for FMV)
  4. Time large sales for lower-income years when possible
  5. Consider installment sales to spread gains over multiple years
  6. Use specific lot identification to sell highest-basis shares
  7. Gift appreciated assets to family members in lower tax brackets
  8. Plan for stepped-up basis at death for legacy assets

Frequently Asked Questions

Q: What is the difference between short-term and long-term capital gains?

A: Short-term gains (assets held ≤1 year) are taxed as ordinary income (up to 37%). Long-term gains (assets held >1 year) receive preferential rates: 0%, 15%, or 20% depending on your income. This difference can save you thousands in taxes.

Q: How is the holding period calculated?

A: The holding period starts the day after you acquire the asset and ends on the day you sell. For example, stock purchased January 15, 2024 becomes long-term on January 16, 2025. The IRS counts whole days, not hours.

Q: What is the wash sale rule?

A: If you sell a security at a loss and buy the same or 'substantially identical' security within 30 days before or after the sale, you cannot deduct the loss. The disallowed loss adds to the cost basis of the new shares.

Q: Can capital losses offset ordinary income?

A: Yes, but only up to $3,000 per year ($1,500 if married filing separately). Losses exceeding this limit carry forward indefinitely. Capital losses first offset capital gains, with any remainder applied to ordinary income.

Q: What is the Net Investment Income Tax (NIIT)?

A: High earners pay an additional 3.8% tax on net investment income (including capital gains) when modified AGI exceeds $200,000 (single) or $250,000 (married). This effectively creates a 23.8% maximum long-term rate for top earners.

Q: Are collectibles taxed differently?

A: Yes. Gains on collectibles (art, antiques, coins, stamps) are taxed at a maximum 28% rate, regardless of holding period. Precious metals (gold, silver) also fall under this category. There is no 0% or 15% rate for collectibles.

Q: How do I minimize capital gains taxes?

A: Hold investments over one year for long-term rates. Use tax-loss harvesting to offset gains. Donate appreciated assets to charity (avoid gains entirely). Consider timing sales in lower-income years. Utilize tax-advantaged accounts (IRA, 401k) where gains are deferred.

Q: What happens when I inherit investments?

A: Inherited assets receive a 'stepped-up' cost basis to fair market value at death. If your parent bought stock for $10 that's worth $100 when they die, your cost basis becomes $100. You owe no tax on the $90 of appreciation during their lifetime.

Capital gains tax rates and thresholds are based on 2025 IRS guidelines and are subject to change. State taxes may apply in addition to federal taxes. This content is for educational purposes only and does not constitute tax advice. Consult a qualified tax professional for advice on your specific situation, especially for complex scenarios involving wash sales, qualified small business stock, or real estate transactions.