Capital Gains Tax Calculator
Calculate short-term versus long-term capital gains tax on stocks, crypto, and real estate, including 2024 IRS brackets and the 3.8% Net Investment Income Tax (NIIT).
Capital Gains & Net Proceeds
Capital Gains & NIIT Formula
Capital Gain = Sale Proceeds − Cost Basis | Long-Term Rate = 0%, 15%, or 20% | NIIT = 3.8% on excess over $200k (Single) / $250k (MFJ)- Holding Period: Assets held 1 year or less are Short-Term (taxed as ordinary income). Assets held over 1 year qualify for preferential Long-Term rates (0%, 15%, 20%).
- Cost Basis: Original purchase price plus commissions, brokerage fees, and reinvested dividends.
- Net Investment Income Tax (NIIT): Statutory 3.8% surtax applying to investment profits when modified adjusted gross income exceeds $200,000 (Single) or $250,000 (Married Joint).
Step-by-Step Worked Example
Calculation Steps:
How to Use This Calculator
Assumptions & Limitations
- 2024 long-term capital gains 0% bracket extends to $47,025 (Single) and $94,050 (Married Joint).
Frequently Asked Questions
Can capital losses offset capital gains?
Yes. Capital losses offset capital gains dollar-for-dollar. If net losses exceed gains, you can deduct up to $3,000 of net capital losses against regular earned income each tax year and carry forward remaining losses indefinitely.
Related Cost Calculators
Federal Income Tax Calculator
Calculate progressive federal income tax liability with full 2024 IRS tax bracket breakdowns, 401(k)/HSA pretax deductions, and tax credits.
Effective Tax Rate Calculator
Calculate your true blended effective tax rate across all federal, state, local, and FICA payroll taxes to see exactly what percentage of gross income you keep.
Dividend Tax Calculator
Calculate federal taxes on qualified dividends versus non-qualified ordinary dividends to determine net after-tax portfolio yields.
Home Sale Capital Gains Tax Calculator
Calculate capital gains tax on selling a home, including the IRS Section 121 primary residence exclusion ($250,000 Single / $500,000 Married) and adjusted cost basis.