Capital Gains Tax Calculator (USA)

Calculate your federal capital gains tax based on sale price, purchase price, and holding period. See your estimated tax liability instantly.

How Capital Gains Tax Works in the USA

Capital gains tax is calculated based on the difference between sale and purchase prices, adjusted by the tax rate:

\[\text{Capital Gains Tax} = (\text{Sale Price} - \text{Purchase Price}) \times \text{Tax Rate}\]

The tax rate depends on your holding period:

  • Short-term: Assets held for one year or less (taxed at ordinary income rates)
  • Long-term: Assets held for more than one year (lower preferential rates)

Calculator: Capital Gains Tax

Capital Gain

$10,000

+0.0%

Holding Period

Long-term

+0.0%

Tax Rate

15%

+0.0%

Tax Due

$1,500

+0.0%

Status: Single Filer

$
$
$

Capital Gains Calculation

Component Value Details Description
Sale Price $25,000 Sold Asset Value Amount received from sale
Purchase Price $15,000 Original Cost Adjusted basis of asset
Capital Gain $10,000 Profit Amount Sale minus purchase price
Holding Period 2 years Long-term Determines tax rate
Tax Due $1,500 15% Estimated tax liability
Understanding Capital Gains Tax

Capital gains tax applies to the profit made from selling assets that have increased in value.

Short-term vs Long-term: Assets held for one year or less are taxed as ordinary income (up to 37%), while assets held for more than one year receive preferential rates of 0%, 15%, or 20% depending on your income level.

Capital Gains Tax Optimization Tips

Reduce your capital gains tax liability with these strategies:

  • Hold assets for more than one year to qualify for lower long-term rates
  • Offset gains with losses to reduce taxable income
  • Consider donating appreciated assets to charity
  • Utilize tax-advantaged accounts for investments

Capital Gains Tax Education

What Are Capital Gains?

Capital gains are the profits realized from selling capital assets such as stocks, bonds, real estate, or collectibles that have increased in value. The gain is realized when you sell the asset for more than you paid for it. Capital losses occur when you sell an asset for less than its purchase price. The tax treatment differs significantly based on how long you held the asset before selling.

How Capital Gains Tax is Calculated

The basic formula is Capital Gains Tax = (Sale Price - Purchase Price) × Tax Rate. However, the tax rate depends on two key factors: your holding period and your income level. For short-term gains (assets held one year or less), the tax rate equals your ordinary income tax rate, which can be as high as 37%. For long-term gains (assets held more than one year), the rates are more favorable: 0%, 15%, or 20%, depending on your income bracket.

Key Rules to Remember
  • Assets held for one year or less are taxed at ordinary income rates
  • Assets held for more than one year receive preferential rates
  • Capital losses can offset capital gains to reduce tax liability
  • Unused capital losses can be carried forward to future years
Tip: Hold investments for more than one year to benefit from lower long-term capital gains rates.
Tip: Use capital losses to offset gains and reduce your overall tax burden.
Tip: Consider tax-loss harvesting at year-end to optimize your portfolio.

Capital Gains Tax Quiz

Question 1: Holding Period

If you buy a stock on January 1, 2023, and sell it on January 1, 2024, what tax rate applies?

Solution:

Answer: A) Short-term rate. The holding period is exactly one year, so it's considered short-term (one year or less).

Pedagogical Note:

For long-term capital gains, you need to hold the asset for more than one year. The day of sale counts toward the holding period.

Question 2: Tax Rate Calculation

If you sell an asset for $30,000 that you bought for $20,000, what is your capital gain?

Solution:

Answer: D) $10,000. Using the formula: Capital Gain = Sale Price - Purchase Price = $30,000 - $20,000 = $10,000.

Pedagogical Note:

This demonstrates the fundamental calculation for determining capital gains.

Question 3: Long-term Rate

For a single filer with $60,000 in income, what is the long-term capital gains tax rate?

Solution:

Answer: B) 15%. For single filers, the 15% rate applies to income between $44,626 and $502,300 (2024 thresholds).

Pedagogical Note:

Long-term capital gains rates are tiered based on income level: 0% for lower incomes, 15% for middle incomes, and 20% for high incomes.

Q&A

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

A: The distinction is based on how long you hold an asset before selling it:

Short-term Capital Gains:

  • Assets held for one year or less
  • Taxed at ordinary income tax rates (up to 37%)
  • No preferential treatment

Long-term Capital Gains:

  • Assets held for more than one year
  • Taxed at preferential rates of 0%, 15%, or 20%
  • More favorable tax treatment

Important: The day of sale counts toward the holding period, so if you bought on January 1, 2023, and sold on January 1, 2024, it would still be short-term since it's exactly one year.

Q: Can I use capital losses to reduce my tax bill?

A: Yes, you can use capital losses to offset capital gains and reduce your tax liability. This strategy is known as tax-loss harvesting.

How It Works:

  • Losses Offset Gains: Capital losses first offset capital gains dollar-for-dollar
  • Excess Losses: Up to $3,000 of excess losses can offset ordinary income annually
  • Carry Forward: Remaining losses can be carried forward indefinitely

Wash Sale Rule: Be aware that if you sell a security at a loss and repurchase the same or substantially identical security within 30 days before or after the sale, the loss cannot be claimed for tax purposes.

Q: Are there any special exemptions for capital gains on primary residences?

A: Yes, there is a significant exclusion for capital gains on the sale of your primary residence:

Primary Residence Exclusion:

  • Single Filers: Up to $250,000 of gain excluded
  • Married Joint: Up to $500,000 of gain excluded
  • Ownership Test: Must have owned the home for at least 2 of the past 5 years
  • Use Test: Must have lived in the home as your primary residence for at least 2 of the past 5 years

Special Circumstances: Partial exclusions are available if you don't meet the full requirements due to unforeseen circumstances like job changes, health issues, or natural disasters.

Important: This exclusion can only be used once every two years.

About

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