FINANCIAL · CAPITAL GAINS TAX
Capital Gains Tax Calculator
Estimate your federal capital gains tax on the sale of a stock or asset — short-term vs. long-term rates, plus the 3.8% Net Investment Income Tax (NIIT) for 2026.
Federal tax only. State capital-gains taxes are not included.
About This Calculator
Estimate your federal capital gains tax on the sale of a stock, real estate, or other asset. Enter your sale proceeds, cost basis, holding period, and filing status to see your tax owed under 2026 federal rates — including the 3.8% Net Investment Income Tax (NIIT) if applicable.
How It Works
The calculator determines your taxable gain (sale proceeds minus cost basis). Short-term gains (held 365 days or less) are taxed at ordinary income rates. Long-term gains (held more than 365 days) are taxed at preferential LTCG rates of 0%, 15%, or 20% depending on your income tier. If your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (MFJ), an additional 3.8% NIIT applies.
The Formula
Tax = gain × LTCG_rate + min(gain, MAGI − threshold) × 0.038
- gain
- Taxable gain = sale proceeds − cost basis
- LTCG_rate
- Long-term capital gains rate: 0%, 15%, or 20% based on income and filing status (2026)
- MAGI
- Modified adjusted gross income = ordinary income + capital gain
- threshold
- NIIT threshold: $200,000 (single/HoH/MFS) or $250,000 (MFJ) — not inflation-adjusted
Frequently Asked Questions
- What is the difference between short-term and long-term capital gains?
- Short-term gains come from assets held 365 days or less and are taxed as ordinary income. Long-term gains (held more than 365 days) qualify for lower preferential rates of 0%, 15%, or 20% for 2026.
- What is the Net Investment Income Tax (NIIT)?
- The NIIT is an additional 3.8% federal surtax on net investment income for taxpayers whose MAGI exceeds $200,000 (single) or $250,000 (married filing jointly). It applies on top of the standard capital gains rate, making the maximum effective rate 23.8% on long-term gains.
- Are state capital gains taxes included?
- No. This calculator shows federal tax only. Most states also tax capital gains, though rates and rules vary widely. Consult a tax professional for your state-specific liability.
- What counts as cost basis?
- Your cost basis is typically the purchase price of the asset plus any commissions, fees, or improvements (for real estate). Inherited assets use a stepped-up basis equal to fair market value at the date of death.