Navigation
Calculators Pricing Blog About Contact
Get Started
Get Started Login
💰

Capital Gains Tax Calculator

Estimate federal capital gains tax on investment profits based on income and holding period.

Your ordinary income

What Is Capital Gains Tax?

Capital gains tax is a federal tax levied on the profit you make when you sell a capital asset — such as stocks, bonds, real estate, or other investments — for more than you paid for it. The difference between your purchase price (cost basis) and your sale price is your capital gain, and this gain is subject to taxation. Understanding capital gains tax is essential for investors, homeowners, and anyone who buys and sells assets, as it directly impacts your net returns.

The U.S. tax system distinguishes between short-term and long-term capital gains based on how long you held the asset. Assets held for one year or less generate short-term gains, taxed at your ordinary income tax rate (10% to 37%). Assets held for more than one year generate long-term gains, taxed at preferential rates of 0%, 15%, or 20% depending on your income level and filing status. This distinction creates a significant tax incentive for holding investments longer than one year.

2024-2025 Capital Gains Tax Rates

Long-Term Capital Gains Rates

For 2024, long-term capital gains rates depend on your taxable income and filing status. Single filers pay 0% on gains up to $47,025, 15% on gains from $47,026 to $518,900, and 20% on gains above $518,900. Married filing jointly thresholds are $94,050 and $583,750 respectively. Head of household thresholds fall between single and married rates.

High-income taxpayers may also owe the Net Investment Income Tax (NIIT), an additional 3.8% on investment income for those with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). This effectively creates a maximum long-term rate of 23.8% for the highest earners.

Short-Term Capital Gains Rates

Short-term capital gains are taxed as ordinary income, meaning they are added to your regular income and taxed at your marginal rate. For 2024, federal income tax brackets range from 10% to 37%. This makes short-term gains significantly more expensive than long-term gains for most taxpayers, which is why tax-efficient investing strategies emphasize holding assets for at least one year.

Understanding Cost Basis

Your cost basis is what you originally paid for the asset, including purchase commissions and fees. For stocks purchased at different times, you may use specific identification, FIFO (first in, first out), or average cost methods to determine which shares you are selling. For inherited assets, the cost basis is typically "stepped up" to the fair market value on the date of death, which can significantly reduce or eliminate capital gains tax on inherited investments.

For real estate, cost basis includes the purchase price plus the cost of improvements (but not routine maintenance). Selling costs such as real estate commissions reduce your net proceeds, effectively reducing your taxable gain. Understanding and accurately calculating cost basis is crucial for minimizing your tax liability.

Tax-Saving Strategies

Tax-loss harvesting: Sell losing investments to offset gains. You can deduct up to $3,000 in net capital losses against ordinary income per year, with excess losses carried forward to future years. Hold for long-term: By holding assets more than one year, you qualify for the lower long-term rates. Use tax-advantaged accounts: Investments in IRAs and 401(k)s grow tax-deferred or tax-free, avoiding capital gains entirely within the account.

Gift appreciated assets: Donating appreciated stock to charity allows you to deduct the full market value without paying capital gains tax. Primary residence exclusion: If you sell your primary home, you can exclude up to $250,000 ($500,000 for married couples) in capital gains if you have lived there at least 2 of the last 5 years.

State Capital Gains Taxes

In addition to federal capital gains tax, most states also tax capital gains as regular income. Some states like California tax capital gains at rates as high as 13.3%, while states like Texas, Florida, Nevada, and Washington have no state income tax at all. A few states offer preferential rates for long-term gains or exclude certain types of gains. This calculator estimates federal tax only — consult your state tax authority for state-specific rates.

Frequently Asked Questions

Short-term capital gains apply to assets held for one year or less and are taxed at your ordinary income tax rate (10-37%). Long-term capital gains apply to assets held over one year and are taxed at preferential rates of 0%, 15%, or 20% depending on income.
For 2024, single filers pay 0% on long-term gains if their taxable income is $47,025 or less. Married filing jointly can have up to $94,050 in taxable income and still pay 0% on long-term gains. Short-term gains are always taxed as ordinary income.
If you sell your primary residence, you can exclude up to $250,000 in gains ($500,000 for married couples) if you lived there at least 2 of the last 5 years. Gains above the exclusion amount are taxed as capital gains. Investment properties do not qualify for this exclusion.
Yes. Capital losses can offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income. Unused losses carry forward to future tax years indefinitely.
The NIIT is an additional 3.8% tax on investment income (including capital gains) for individuals with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). This can bring the effective maximum long-term capital gains rate to 23.8%.
No, this calculator estimates federal capital gains tax only. Most states also tax capital gains as regular income. States like California can add up to 13.3%, while states like Florida and Texas have no state income tax.

Embed this Calculator

Copy the code below and paste it into your website's HTML. Your visitors can use this calculator for free.

px × px
<iframe src="https://calculatorteam.com/embed/capital-gains-tax-calculator" width="100%" height="600" style="border:none;border-radius:12px;" loading="lazy" title="Capital Gains Tax Calculator"></iframe>

Report an Issue

Let us know what's wrong with this calculator. We'll review and fix it as soon as possible.