How the tax on your gain is calculated
- Gain = sale price − cost basis.
- Your other income, minus the standard deduction, fills the ordinary tax brackets first.
- Long-term gains are stacked on top and taxed at 0%, 15% or 20% depending on where they fall in the brackets above. Short-term gains are taxed as extra ordinary income at your regular rates.
- If your income including the gain is above the NIIT threshold, 3.8% applies to the part of the gain above it.
The calculator assumes the standard deduction and no other capital gains or losses this year. It does not include state tax; most states tax capital gains as regular income.
Ways to reduce capital gains tax
- Hold investments for more than a year to qualify for long-term rates.
- Sell losing positions to offset gains (tax-loss harvesting), watching the wash-sale rule for stocks.
- Realize gains in lower-income years, when more of the gain may fall in the 0% bracket.
- Hold growth investments in tax-advantaged accounts such as a 401(k) or IRA.
Frequently asked questions
What is the difference between short-term and long-term capital gains?
Assets held for one year or less produce short-term gains, taxed at your ordinary income tax rates (10% to 37%). Assets held for more than one year produce long-term gains, taxed at 0%, 15% or 20% depending on your taxable income.
What is the Net Investment Income Tax?
An extra 3.8% tax on investment income, including capital gains, for people whose modified adjusted gross income is above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are set by law and are not adjusted for inflation.
Is crypto taxed the same way?
Yes. The IRS treats cryptocurrency as property, so selling, swapping or spending it is a taxable event, and gains are short-term or long-term based on how long you held it, just like stocks.
What if I sold at a loss?
Capital losses first offset capital gains. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) can offset ordinary income, and the rest carries forward to future years.
What about selling my home?
If you owned and lived in your main home for at least two of the last five years, you can usually exclude up to $250,000 of gain ($500,000 for married couples filing jointly). Subtract that exclusion from your gain before using this calculator.