Important Disclaimer — Not Financial Advice

The results from this calculator are for informational and educational purposes only. They are not a guarantee of actual outcomes and should not be considered financial, investment, tax, or legal advice. Always consult a qualified professional for advice tailored to your specific financial situation. See our Terms of Service and Privacy Policy for more information.

What Is This Calculator?

Selling an asset for more than you paid? The IRS wants a cut. This calculator figures out exactly how much tax you owe based on your profit, how long you held the asset, and your income bracket. In 2026, long-term capital gains rates remain at 0%, 15%, or 20% depending on your taxable income — but short-term gains (assets held 12 months or less) get taxed at your ordinary income rate, which can be as high as 37%.

📖 Definition

A capital gains tax calculator estimates the tax owed on the profit from selling an asset, based on how long you held it and your income bracket.

Key Takeaways

1

Short-term gains (held 12 months or less) are taxed at your ordinary income rate — up to 37% in 2026.

2

Extended holds (over 12 months) qualify for the 0%, 15%, or 20% rate, which is substantially lower for most earners.

3

Your overall taxable income determines which bracket you fall in — selling in a low-income year can save thousands.

4

The primary residence exclusion can shield up to $250,000 of gain ($500,000 for married couples) from taxation entirely.

The Formula

Capital Gain = Selling Price - (Purchase Price + Selling Expenses); Tax Amount = Capital Gain * Applicable Tax Rate

Subtract what you paid (plus any commissions or fees) from what you sold it for. That profit gets multiplied by whichever tax rate applies to your situation.

Why This Matters — Real-World Application

Say you bought 100 shares of Apple at $150 in March 2024 and sold them at $200 in May 2026. That is $5,000 in profit over 14 months, which qualifies for the lower rate. If your taxable income is $95,000, you fall in the 15% bracket and owe $750. But if you had sold after just 10 months, the IRS taxes that $5,000 at your ordinary income rate — potentially $1,850 if you are in the 37% bracket. That 14-month hold saved you over $1,100.

Practical Example

You purchased stock for $5,000 and sold it for $8,000 after two years. Your capital gain is $3,000. At the 15% rate (which applies to most middle-income earners in 2026), you owe $450. If you had sold after just 8 months instead, that same $3,000 would be taxed at your ordinary rate — potentially $1,110 if you are in the 37% bracket.

Key Factors That Affect Your Results

  • How long you held the asset (over 12 months gets the lower rate)
  • Your total taxable income for the year
  • What you originally paid (your cost basis)
  • Any commissions or fees from the sale

Tips for Using This Calculator

  • 1Track your exact purchase price including commissions — even a $10 fee increases your cost basis and reduces your taxable gain.
  • 2If you are near a bracket threshold, consider waiting until January to sell. Crossing from $518,900 into $518,001 in taxable income can drop your rate from 20% to 15% on a large gain.
  • 3Losses offset gains. If you sold one stock for a $3,000 gain and another for a $1,000 loss, you only pay tax on $2,000 of net profit.

Related Calculators

Related Guides & Articles

Sources & References

  • IRS Publication 550 — Investment Income and Expenses
  • IRS Topic No. 409 — Capital Gains and Losses
  • Federal Reserve — Survey of Consumer Finances on Asset Ownership

These authoritative sources inform our calculator methodology and ensure accuracy.

QM

Written by Qasem Mohammed

Financial tools developer and founder of QFINHUB. All calculators are built with industry-standard formulas and reviewed for accuracy. Content is for educational purposes only — always consult a qualified financial professional for decisions about your specific situation.

Last updated: August 10, 2026 ·About QFINHUB · Editorial Policy

QM

Last reviewed by Qasem MohammedAugust 10, 2026

AI & Software Engineer, Founder & Lead Developer at QFINHUB · Editorial Policy