Capital Gains Tax Calculator

Investment tax estimator • 2026 tax planning tool

Capital Gains Tax Formula:

Show Calculator

The capital gains tax calculation is: Tax = (Sales Price - Purchase Price - Fees) × Tax Rate

For 2026, the federal long-term capital gains tax rates are:

  • 0%: Up to $44,625 for single filers, $89,250 for joint filers
  • 15%: $44,626 - $492,300 for single filers, $89,251 - $553,850 for joint filers
  • 20%: Over $492,300 for single filers, over $553,850 for joint filers

Short-term capital gains (assets held for 1 year or less) are taxed as ordinary income. State taxes may also apply depending on your state of residence.

Personal Information

Transaction Details

Advanced Options

Results

$4,950.00
Net Capital Gain
$742.50
Federal Tax
$0.00
State Tax
$742.50
Total Tax Liability
Item Amount Description
Sales Price $15,000.00 Amount received from sale
Purchase Price $10,000.00 Original cost basis
Transaction Fees $50.00 Brokerage fees, commissions
Net Capital Gain $4,950.00 Profit after fees
Federal Tax Rate 15.0% Based on income and holding period
Federal Tax Owed $742.50 Calculated tax liability
Category Amount Rate Tax
Long-term Capital Gain $4,950.00 15.0% $742.50
State Tax $4,950.00 0.0% $0.00
Total Tax $4,950.00 - $742.50

Comprehensive Capital Gains Tax Guide

Understanding Capital Gains Tax

Capital gains tax is levied on the profit from selling capital assets such as stocks, bonds, real estate, collectibles, or other investments. The tax rate depends on how long you held the asset before selling. Short-term gains (assets held for 1 year or less) are taxed as ordinary income, while long-term gains (assets held for more than 1 year) receive preferential tax treatment with lower rates.

Capital Gains Tax Formula

The calculation involves several components:

\( \text{Net Capital Gain} = \text{Sales Price} - \text{Purchase Price} - \text{Transaction Fees} \)
\( \text{Tax Liability} = \text{Net Capital Gain} \times \text{Applicable Tax Rate} \)

Where the applicable tax rate is determined by filing status, income level, and holding period.

Tax Rate Determination
1
Determine Holding Period: Calculate how long you held the asset. Assets held for 1 year or less are short-term; those held for more than 1 year are long-term.
2
Identify Tax Brackets: Based on your filing status and income, determine your federal long-term capital gains tax bracket (0%, 15%, or 20%).
3
Consider State Tax: Add applicable state tax rates, which vary by state (some states have no income tax).
Federal Tax Brackets for 2026

Federal long-term capital gains rates for 2026:

  • 0%: Up to $44,625 (single), $89,250 (joint)
  • 15%: $44,626-$492,300 (single), $89,251-$553,850 (joint)
  • 20%: Over $492,300 (single), over $553,850 (joint)
  • Special Cases: Collectibles taxed at 28%, depreciation recapture at 25%
Tax Planning Strategies
  • Hold for Long-term: Wait over 1 year to qualify for lower rates
  • Tax Loss Harvesting: Offset gains with losses to reduce tax liability
  • Charitable Donations: Donate appreciated assets to avoid capital gains
  • Installment Sales: Spread gains over multiple years
  • Like-kind Exchanges: Defer gains on real estate

Tax Basics

What is Capital Gains Tax?

Tax on profit from selling capital assets like stocks, bonds, real estate.

Basic Formula

\( \text{Tax} = \text{Net Gain} \times \text{Tax Rate} \)

Where net gain is sales price minus cost basis and fees.

Key Guidelines:
  • Short-term: 1 year or less = ordinary income tax
  • Long-term: Over 1 year = preferential rates
  • Include all transaction fees in cost basis

Planning

Tax Planning Strategies

Methods to minimize tax liability while staying compliant.

Strategic Approaches
  1. Tax loss harvesting
  2. Asset location optimization
  3. Timing of sales
  4. Charitable giving
Considerations:
  • Investment objectives
  • Cash flow needs
  • Overall tax situation
  • State tax implications

Capital Gains Tax Learning Quiz

Question 1: Multiple Choice - Understanding Tax Rates

For a married couple filing jointly with an income of $120,000 in 2026, what would be the long-term capital gains tax rate on a stock held for 3 years?

Solution:

The answer is B) 15%. For married couples filing jointly in 2026, the long-term capital gains tax brackets are: 0% for income up to $89,250, 15% for income between $89,251 and $553,850, and 20% for income over $553,850. Since $120,000 falls in the second bracket, the applicable rate is 15%. The 3-year holding period qualifies as long-term, so the lower capital gains rate applies instead of ordinary income tax rates.

Pedagogical Explanation:

This question highlights the importance of understanding how your income level affects your capital gains tax rate. The brackets are indexed annually for inflation, so it's important to use the current year's brackets. The holding period is crucial - only assets held for more than one year qualify for the preferential long-term rates. The 15% rate for this income level represents a significant advantage over ordinary income tax rates, which would be much higher for the same income level.

Key Definitions:

Long-term Capital Gain: Profit from selling assets held for more than 1 year

Short-term Capital Gain: Profit from selling assets held for 1 year or less

Cost Basis: Original purchase price plus transaction fees

Important Rules:

• Long-term: Held for more than 1 year

• Short-term: Held for 1 year or less

  • Tax rates depend on income and filing status
  • Tips & Tricks:

    • Remember the 1-year holding period threshold

    • Check current year's tax brackets

    • Include all transaction fees in cost basis

    Common Mistakes:

    • Confusing short-term with long-term rates

    • Forgetting to update for inflation-adjusted brackets

    • Not accounting for transaction fees

    Question 2: Detailed Analysis - Calculating Tax Liability

    If you purchased 100 shares of stock for $50 per share ($5,000 total) in January 2020 and sold them for $80 per share ($8,000 total) in March 2025, with $50 in transaction fees, calculate the capital gains tax owed for a single filer with $60,000 in annual income. Assume no other capital gains or losses.

    Solution:

    Calculations:
    Net Capital Gain = Sales Price - Purchase Price - Fees
    Net Capital Gain = $8,000 - $5,000 - $50 = $2,950

    Holding Period: January 2020 to March 2025 = 5 years and 2 months (long-term)

    Tax Rate: For single filer with $60,000 income in 2026, the long-term capital gains rate is 15% (since $60,000 falls in the $44,626-$492,300 bracket)

    Tax Owed = $2,950 × 15% = $442.50

    Conclusion: The total capital gains tax owed would be $442.50, representing 15% of the net capital gain of $2,950.

    Pedagogical Explanation:

    This calculation demonstrates the step-by-step process for determining capital gains tax. First, calculate the net gain by subtracting the purchase price and fees from the sales price. Then determine the holding period to identify whether short-term or long-term rates apply. Finally, use the taxpayer's income level and filing status to determine the appropriate tax rate. The calculation shows that the tax is applied only to the actual profit, not the full sales amount.

    Key Definitions:

    Net Capital Gain: Sales price minus cost basis and fees

    Cost Basis: Original purchase price plus fees

    Holding Period: Time between purchase and sale

    Important Rules:

    • Tax = Net Gain × Applicable Rate

    • Include all transaction fees in cost basis

    • Use current year's tax brackets

    Tips & Tricks:

    • Use the formula: Tax = (Sales - Purchase - Fees) × Rate

    • Remember to account for inflation-adjusted brackets

    • Keep detailed records of all transaction fees

    Common Mistakes:

    • Forgetting to subtract transaction fees

    • Using incorrect tax brackets

    • Confusing holding period calculation

    Capital Gains Tax Calculator

    FAQ

    Q: What's the difference between short-term and long-term capital gains, and how do the tax rates differ?

    A: The key difference lies in the holding period and tax treatment:

    Short-term Capital Gains: Assets held for 1 year or less. Taxed as ordinary income at rates up to 37% depending on your tax bracket.

    Long-term Capital Gains: Assets held for more than 1 year. Taxed at preferential rates of 0%, 15%, or 20% based on your income level.

    For 2026, the long-term rates are:
    - 0%: Up to $44,625 for single, $89,250 for joint
    - 15%: $44,626-$492,300 for single, $89,251-$553,850 for joint
    - 20%: Over $492,300 for single, over $553,850 for joint

    Example: If you buy stock for $10,000 and sell for $15,000:
    - Held 6 months (short-term): $5,000 taxed as ordinary income (e.g., 22% = $1,100)
    - Held 2 years (long-term): $5,000 taxed at 15% = $750
    The long-term rate saves $350 in this example.

    Q: How does tax loss harvesting work and what are the limitations?

    A: Tax loss harvesting involves selling securities at a loss to offset capital gains and reduce tax liability:

    Calculation: Net Capital Gain/Loss = Total Gains - Total Losses

    Losses first offset gains of the same type (short-term losses offset short-term gains, long-term losses offset long-term gains). Any excess losses can offset the other type of gain.

    Limitations:
    - Annual deduction limit: $3,000 ($1,500 if married filing separately) can be deducted against ordinary income
    - Excess losses carry forward indefinitely
    - Wash sale rule: Cannot repurchase substantially identical securities within 30 days before or after the sale
    - Must be realized losses (actual sales), not paper losses

    Example: If you have $10,000 in gains and harvest $8,000 in losses:
    Net gain subject to tax = $10,000 - $8,000 = $2,000
    If losses exceed gains (e.g., $12,000 losses, $10,000 gains), you can deduct $2,000 against ordinary income, with $1,000 carried forward to next year.

    About

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