Skip to main content

Capital Gains Tax Calculator

Estimate your federal capital gains tax on investment sales, including long-term and short-term rates, NIIT, and net profit.

How it works: Enter your purchase price, sale price, holding period, income, and filing status. The calculator applies 2024 federal tax brackets, distinguishes short-term from long-term gains, and includes the 3.8% Net Investment Income Tax where applicable.
Disclaimer: This calculator provides estimates for educational purposes only. Tax rates shown are based on 2024 federal data and may not reflect current law. Tax laws, rates, and financial conditions vary by jurisdiction and change over time. Consult a qualified tax professional before making financial decisions.
Ad (leaderboard)

Results

Capital Gain $0.00
Term -
Tax Rate 0.00%
Tax Owed $0.00
NIIT (3.8%) $0.00
Net Profit $0.00
Effective Tax Rate 0.00%
Rate this tool
0.0 / 5 · 0 ratings

Embed This Calculator

Add this calculator to your website for free. Copy the single line of code below and paste it into your HTML. The calculator auto-resizes to fit your page.

<script src="https://calchammer.com/embed.js" data-calculator="capital-gains-tax-calculator" data-category="finance"></script>
data-theme "light", "dark", or "auto"
data-values Pre-fill inputs, e.g. "amount=1000"
data-max-width Max width, e.g. "600px"
data-border "true" or "false"
Or use an iframe instead
<iframe src="https://calchammer.com/embed/finance/capital-gains-tax-calculator" width="100%" height="500" style="border:none;border-radius:12px;" title="Capital Gains Tax Calculator"></iframe>

Preview

yoursite.com/blog
Capital Gains Tax Calculator auto-resizes here
Ad (in_results)

How to Use the Capital Gains Tax Calculator

Understanding capital gains tax is essential for anyone who invests in stocks, bonds, mutual funds, real estate, or other assets. When you sell an asset for more than you paid, the profit is called a capital gain, and the IRS taxes it. Our calculator estimates your federal capital gains tax so you can plan your investment sales strategically and minimize your tax burden.

Enter the purchase price, which is your cost basis, or what you originally paid for the asset including commissions and fees. Then enter the sale price, which is the amount you received or expect to receive when selling. The difference between these two amounts is your capital gain or loss. If you sell at a loss, no capital gains tax is owed.

The holding period determines whether your gain is classified as short-term or long-term. Assets held for 12 months or less are considered short-term and taxed at your ordinary income tax rate. Assets held for more than 12 months qualify for the lower long-term capital gains rates of 0%, 15%, or 20%. This distinction can make a significant difference in your tax bill, which is why many investors aim to hold positions for at least 13 months before selling.

Your annual income and filing status determine which tax bracket applies. For long-term gains, the rate depends on your total taxable income including the gain. For short-term gains, the calculator applies the marginal ordinary income tax brackets to the gain amount, starting from your existing income level. High-income taxpayers may also owe the 3.8% Net Investment Income Tax (NIIT), which applies when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married filing jointly.

The effective tax rate shown combines the capital gains tax and any NIIT owed, expressed as a percentage of your total gain. This gives you a clear picture of what percentage of your profit goes to federal taxes. Keep in mind that state capital gains taxes, which vary widely, are not included in this calculation. Consult a tax professional for complete tax planning advice.

Ad (in_content)

Capital Gains Tax Rates for 2024

Long-term capital gains are taxed at three rates based on your taxable income:

0% Rate: Single filers up to $47,025; Married filing jointly up to $94,050.

15% Rate: Single filers from $47,026 to $518,900; Married filing jointly from $94,051 to $583,750.

20% Rate: Income above the 15% threshold for your filing status.

Short-term capital gains are added to your ordinary income and taxed at the applicable federal bracket rates ranging from 10% to 37%. The NIIT of 3.8% is applied to the lesser of your net investment income or the amount by which your MAGI exceeds the applicable threshold.

Frequently Asked Questions

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

Short-term capital gains apply to assets held for 12 months or less and are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term capital gains apply to assets held for more than 12 months and are taxed at preferential rates of 0%, 15%, or 20%, depending on your taxable income and filing status.

What are the 2024 long-term capital gains tax rates?

For 2024, single filers pay 0% on taxable income up to $47,025, 15% up to $518,900, and 20% above that. Married filing jointly pay 0% up to $94,050, 15% up to $583,750, and 20% above. These thresholds include the capital gain itself when determining which bracket applies.

What is the Net Investment Income Tax (NIIT)?

The NIIT is an additional 3.8% tax on net investment income, including capital gains, for taxpayers whose modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married filing jointly. This surtax was introduced as part of the Affordable Care Act and applies on top of regular capital gains taxes.

How can I reduce my capital gains tax?

Strategies to reduce capital gains tax include holding assets for more than 12 months to qualify for lower long-term rates, tax-loss harvesting to offset gains with losses, using tax-advantaged accounts like IRAs and 401(k)s, timing your sales in lower-income years, and taking advantage of the $250,000/$500,000 primary residence exclusion for home sales.

Do I owe capital gains tax if I sell at a loss?

No, you do not owe capital gains tax on a loss. In fact, you can use capital losses to offset capital gains and reduce your tax bill. If your losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income per year and carry forward any remaining losses to future tax years.

Related Calculators

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and should not be considered professional financial, tax, or investment advice. Consult a qualified professional before making decisions based on these calculations. See our full Disclaimer.