How to use it
- Enter your gain (sale price minus cost).
- Enter your other taxable income without this gain.
- Choose how long you held it and your filing status. The tax appears right away.
What this calculates
A capital gain is the profit when you sell an asset such as stocks for more than you paid. If you held it for more than a year, the gain is taxed at lower long-term rates (0%, 15% or 20%). If you held it for a year or less, it is taxed like ordinary income.
The formulas
- Long-term: the gain is stacked on top of your other taxable income. The part below the 0% limit is untaxed, the part up to the 15% limit is taxed at 15%, and anything above is taxed at 20%. 2026 limits for single filers: 0% up to 49,450, 15% up to 545,500. 2027: 0% up to 51,050, 15% up to 563,200.
- Short-term = ordinary tax on (other income + gain) − ordinary tax on other income
- Effective rate = tax ÷ gain
Worked examples
- Single, other income 40,000, long-term gain 20,000 → 9,450 untaxed, 10,550 at 15% = 1,582.50
- Single, other income 60,000, short-term gain 10,000 → ordinary rate 22%, tax 2,200
- Married jointly, other income 90,000, long-term gain 20,000 → 8,900 untaxed, 11,100 at 15% = 1,665
Frequently asked questions
What counts as long-term?
You must hold the asset for more than one year. Selling after exactly one year or less makes it short-term.
Why does my other income matter?
Long-term gains are taxed on top of your other taxable income, so the more other income you have, the more of the gain falls into the 15% or 20% band.
Does this include the net investment income tax?
No. A separate 3.8% tax can apply to investment income for higher earners. It is not included here.
Can losses offset gains?
Yes. Capital losses first offset capital gains, and up to 3,000 of net losses can offset other income each year. Enter the net gain after losses.
Does this cover real estate or collectibles?
No. Home sales have a separate exclusion, and collectibles have a higher 28% rate. This calculator is for ordinary investments such as stocks and funds.
Are my numbers stored?
No. Everything is calculated in your browser and nothing is sent to a server or saved.
Good to know
- Rates and thresholds are from IRS Revenue Procedure 2025-32 (tax year 2026) and Revenue Procedure 2026-35 (tax year 2027): irs.gov.
- This is an estimate, not tax advice. Check the IRS or a tax professional for your return.
Last updated 2026-12-02 · For reference only; not investment, tax or legal advice.