Capital Gains Calculator

Calculate your capital gains tax • 2026 rates

Capital Gains Tax Formula:

Show the calculator

\( \text{Capital Gains Tax} = \text{Gain} \times \text{Tax Rate} \)

Where:

  • \( \text{Gain} \) = Sale Price - Purchase Price - Expenses
  • \( \text{Tax Rate} \) = Short-term (ordinary income tax rate) or Long-term (0%, 15%, or 20%)
  • \( \text{Holding Period} \) = Long-term (>1 year), Short-term (≤1 year)

This formula calculates the tax on profits from selling investments.

Example: For a long-term gain of $20,000 in the 15% bracket:

Tax = $20,000 × 15% = $3,000

Thus, the capital gains tax liability would be $3,000.

Personal Information

Investment Details

Advanced Options

Capital Gains Analysis

$4,900.00
Total Capital Gain
$735.00
Tax Liability
15.0%
Effective Tax Rate
$14,265.00
Net Proceeds After Tax
Detail Amount
Short-Term Gains
Amount: $0.00
Tax Rate: 0%
Tax Liability: $0.00
Long-Term Gains
Amount: $4,900.00
Tax Rate: 15%
Tax Liability: $735.00
Hold for Long-Term
Optimal Strategy
Based on your holding period and tax bracket

Comprehensive Capital Gains Guide

What are Capital Gains?

Capital gains are profits realized from the sale of capital assets such as stocks, bonds, real estate, collectibles, or other investments. The gain is calculated as the difference between the purchase price (cost basis) and the sale price. Capital gains are categorized as either short-term or long-term based on how long you held the asset before selling.

Capital Gains Tax Calculation

The standard method for calculating capital gains tax follows these steps:

\( \text{Capital Gains Tax} = \text{Gain} \times \text{Tax Rate} \)

Where:

  • \( \text{Gain} \) = Sale Price - Purchase Price - Transaction Costs
  • \( \text{Tax Rate} \) = Based on holding period and income level
  • \( \text{Holding Period} \) = Long-term (>1 year) or Short-term (≤1 year)

Capital Gains Tax Rates (2026)
1
Short-Term: Taxed as ordinary income (10% - 37%)
2
Long-Term (Single): 0% (≤$44,625), 15% ($44,626-$492,300), 20% (≥$492,301)
3
Long-Term (Married Joint): 0% (≤$89,250), 15% ($89,251-$553,850), 20% (≥$553,851)
4
Additional Medicare Tax: 3.8% on net investment income if AGI > $200,000 (single) or $250,000 (joint)
Capital Losses and Carryovers

Capital losses can offset capital gains and up to $3,000 of ordinary income annually:

  • Offsetting Gains: Losses first offset gains of the same type
  • Net Losses: Up to $3,000 can offset ordinary income
  • Carryover: Excess losses carry forward indefinitely
  • Wash Sales: Cannot claim loss if buying similar asset within 30 days
Tax Planning Strategies
  • Hold for Long-Term: Wait more than one year to qualify for lower rates
  • Harvest Losses: Sell losing investments to offset gains
  • Timing Sales: Coordinate with income years to optimize brackets
  • Charitable Giving: Donate appreciated assets to avoid capital gains
  • Installment Sales: Spread gains over multiple years

Capital Gains Basics

What are Capital Gains?

Profit from selling capital assets held for investment purposes.

Formula

\( \text{Capital Gains Tax} = \text{Gain} \times \text{Tax Rate} \)

Where: Gain=Sale Price-Purchase Price-Expenses, Tax Rate=Based on holding period and income.

Key Rules:
  • Long-term (>1 year) taxed at lower rates
  • Short-term (≤1 year) taxed as ordinary income
  • Capital losses can offset gains and income

Strategies

Tax Optimization

Plan timing and structure of investments to minimize capital gains tax liability.

Planning Approaches
  1. Hold assets longer than one year
  2. Harvest losses to offset gains
  3. Donate appreciated assets to charity
  4. Use tax-advantaged accounts
Considerations:
  • Wash sale rules apply to loss harvesting
  • State taxes may apply separately
  • Collectibles taxed at higher rates
  • Professional advice recommended for complex situations

Capital Gains Learning Quiz

Question 1: Multiple Choice - Understanding Holding Periods

What is the minimum holding period to qualify for long-term capital gains tax rates?

Solution:

The answer is B) 1 year. To qualify for long-term capital gains tax rates, you must hold an asset for more than one year before selling. Assets held for one year or less are subject to short-term capital gains rates, which are equivalent to your ordinary income tax rate.

Pedagogical Explanation:

Understanding the holding period is fundamental to capital gains tax planning. Students learn that the one-year threshold is critical for determining which tax rate applies. The exact holding period is "more than one year," meaning if you hold an asset for exactly one year and one day, it qualifies for long-term treatment.

Key Definitions:

Short-Term Capital Gains: Gains on assets held ≤1 year, taxed as ordinary income

Long-Term Capital Gains: Gains on assets held >1 year, taxed at preferential rates

Cost Basis: Original purchase price including transaction costs

Important Rules:

• Holding period starts the day after purchase

• Holding period ends the day of sale

• More than one year = long-term treatment

Tips & Tricks:

• Remember: 1 year + 1 day = long-term

  • Track purchase dates carefully
  • Consider timing of sales for optimal rates
  • Common Mistakes:

    • Assuming exactly 1 year counts as long-term

  • Forgetting to include transaction costs in basis
  • Not considering wash sale rules
  • Question 2: Detailed Problem - Calculating Capital Gains Tax

    Sarah bought 100 shares of stock for $50 per share on January 1, 2022. She sold them on February 15, 2024, for $75 per share. Her transaction costs were $100. Sarah is single with an annual income of $80,000. Calculate her capital gains tax liability and explain the calculation process.

    Solution:

    Step 1: Calculate purchase price

    Purchase Price = 100 shares × $50 = $5,000

    Step 2: Calculate sale price

    Sale Price = 100 shares × $75 = $7,500

    Step 3: Calculate capital gain

    Gain = Sale Price - Purchase Price - Transaction Costs

    Gain = $7,500 - $5,000 - $100 = $2,400

    Step 4: Determine holding period

    Held from Jan 1, 2022 to Feb 15, 2024 = over 2 years

    Therefore, this is a long-term capital gain

    Step 5: Determine tax rate

    Single filer with $80,000 income falls in the 15% long-term capital gains bracket (between $44,626 and $492,300)

    Step 6: Calculate tax liability

    Tax = $2,400 × 15% = $360

    Therefore, Sarah's capital gains tax liability is $360.

    Pedagogical Explanation:

    This problem demonstrates the multi-step process of calculating capital gains tax. Students learn to identify the key components: purchase price, sale price, transaction costs, holding period, and applicable tax rate. The example shows how the holding period determines the tax rate, which significantly impacts the final tax liability.

    Key Definitions:

    Cost Basis: Original purchase price including transaction costs

    Capital Gain: Profit from selling an asset

    Holding Period: Time between purchase and sale

    Important Rules:

    • Include transaction costs in cost basis

    • Long-term = more than one year holding period

    • Tax rate depends on income level and filing status

    Tips & Tricks:

    • Keep detailed records of all transaction costs

    • Track purchase dates for holding period calculations

    • Know your tax bracket for planning purposes

    Common Mistakes:

    • Forgetting to include transaction costs in basis

  • Miscalculating the holding period
  • Using wrong tax rate for income level
  • capital-gains-calculator

    FAQ

    Q: How do capital losses offset capital gains?

    A: Capital losses can offset capital gains in the following order:

    1. Same Type Offset: Short-term losses first offset short-term gains, long-term losses first offset long-term gains

    2. Cross-Offset: Remaining losses can offset gains of the opposite type

    3. Ordinary Income: After offsetting all gains, up to $3,000 of excess losses can offset ordinary income

    4. Carryforward: Any remaining losses carry forward to future years indefinitely

    Example: If you have $5,000 in long-term gains and $7,000 in long-term losses, the gains are eliminated, $3,000 can offset ordinary income, and $1,000 carries forward.

    Q: What is the wash sale rule and how does it affect capital losses?

    A: The wash sale rule prevents taxpayers from claiming a loss on the sale of a security if they purchase a substantially identical security within 30 days before or after the sale.

    The rule applies when:

    1. Substantially Identical: The replacement security is essentially the same as the sold security

    2. Time Frame: Purchase occurs within 30 days before or after the sale

    3. Result: The loss is disallowed for tax purposes

    Instead of losing the tax benefit permanently, the disallowed loss is added to the cost basis of the replacement security, preserving the economic benefit for when the replacement is eventually sold.

    About

    Tax Professional Team
    This calculator was created
    This calculator was created by our Finance & Business Team , may make errors. Consider checking important information. Updated: April 2026.