Capital Gains Tax Calculator

Calculate your potential tax liability from the sale of investments or property.

Investment Details

Sales commissions, closing costs, attorney fees, etc.

Holding Period & Tax Info

Used to determine your tax bracket
Optional: Include your state's capital gains tax rate

Understanding Capital Gains Tax

When you sell an investment or asset for more than you paid for it, the profit is called a capital gain. The federal government taxes these gains at different rates depending on how long you owned the asset and your income level.

Short-Term vs. Long-Term Capital Gains

Short-Term Capital Gains

Assets held for one year or less are subject to short-term capital gains tax. These gains are taxed as ordinary income, which means they're taxed at your regular income tax rate (ranging from 10% to 37%, depending on your income bracket).

Long-Term Capital Gains

Assets held for more than one year are subject to long-term capital gains tax. These gains benefit from lower tax rates than ordinary income — typically 0%, 15%, or 20%, depending on your income.

How to Calculate Capital Gains Tax

Calculating your capital gains tax involves several steps:

1. Determine Your Cost Basis

Your cost basis is generally what you paid for the asset, including commissions and fees, plus the cost of improvements (for real estate).

2. Calculate Your Capital Gain

Subtract your cost basis from the selling price of the asset:

Capital Gain = Selling Price - Cost Basis

3. Determine Your Tax Rate

Your tax rate depends on:

  • Whether the gain is short-term or long-term
  • Your filing status (single, married filing jointly, etc.)
  • Your taxable income

4. Calculate Your Tax Liability

Tax = Capital Gain × Tax Rate

2023 Long-Term Capital Gains Tax Rates

Filing Status 0% Rate 15% Rate 20% Rate
Single Up to $44,625 $44,626 - $492,300 Over $492,300
Married Filing Jointly Up to $89,250 $89,251 - $553,850 Over $553,850
Married Filing Separately Up to $44,625 $44,626 - $276,900 Over $276,900
Head of Household Up to $59,750 $59,751 - $523,050 Over $523,050

Strategies to Minimize Capital Gains Tax

1. Hold Investments for More Than a Year

Converting short-term gains into long-term gains by holding investments for more than a year can significantly reduce your tax burden.

2. Use Tax-Loss Harvesting

You can offset capital gains with capital losses. If you've sold investments at a loss, you can use those losses to reduce your capital gains tax liability.

3. Utilize Tax-Advantaged Accounts

Investments in tax-advantaged accounts like 401(k)s, IRAs, and 529 plans grow tax-free or tax-deferred, meaning you won't pay capital gains tax on investments within these accounts.

4. Consider Timing of Sales

Strategically timing when you sell investments can help manage your tax liability. For instance, you might wait until a new tax year to sell if you expect to be in a lower tax bracket.

5. Look into Section 1031 Exchanges for Real Estate

For real estate investors, a 1031 exchange allows you to defer capital gains tax if you reinvest the proceeds from the sale of one property into another "like-kind" property.

Special Considerations

Net Investment Income Tax (NIIT)

High-income earners may be subject to an additional 3.8% Net Investment Income Tax on certain investment income, including capital gains.

Home Sale Exclusion

If you sell your primary residence, you may exclude up to $250,000 of capital gains ($500,000 for married couples filing jointly) if you've owned and lived in the home for at least two of the five years before the sale.

State Taxes

In addition to federal capital gains tax, many states also tax capital gains, typically at the same rate as ordinary income in that state.

Collectibles and Certain Small Business Stock

Gains from collectibles (like art, antiques, and precious metals) are taxed at a maximum rate of 28%, regardless of your income level. Qualified small business stock may be eligible for partial exclusion from capital gains tax.