Capital Gains Tax Calculator

Estimate federal and state taxes owed on profit from selling stocks, real estate, or other assets.

Asset Sale Details

Note: Long-term gains are taxed at 0%, 15%, or 20% based on income brackets. Short-term gains are taxed at ordinary income rates (simplified here at 22% top marginal). 3.8% Net Investment Income Tax (NIIT) may apply to high earners.
Please enter valid cost basis and sale price.

Tax Breakdown

Gross Profit (Gain) $0
Federal Capital Gains Tax $0
NIIT (3.8%) — High Earner Surtax $0
State Tax $0
Total Tax Owed $0
After-Tax Profit $0
Effective Tax Rate on Gain 0%

How It Works

This calculator estimates capital gains tax by first computing Gain = Sale Price − Cost Basis. Long-term gains (held over a year) are taxed at preferential rates of 0%, 15%, or 20% depending on taxable income plus the gain. Short-term gains are treated as ordinary income using simplified marginal rates. State tax is applied as a flat percentage of the gain. High earners (MAGI over $200k single / $250k joint) may also owe the 3.8% Net Investment Income Tax on the lesser of the gain or the amount MAGI exceeds the threshold. Total tax is federal + state + NIIT; after-tax profit is gain minus total tax.

Frequently Asked Questions

How is capital gains tax calculated?

Capital gains tax is calculated on the difference between your sale price and cost basis (what you paid plus fees). Long-term gains held over one year receive preferential rates (0%, 15%, or 20%). Short-term gains held one year or less are taxed at ordinary income rates. State taxes and a 3.8% NIIT surtax may also apply.

Do I pay capital gains tax on my primary home?

Often no. Under IRS rules (Section 121), single filers can exclude up to $250,000 of gain and married couples filing jointly can exclude up to $500,000, provided you owned and lived in the home for at least 2 of the last 5 years. Gains above these limits are taxable.

What is the 3.8% Net Investment Income Tax (NIIT)?

The NIIT is a 3.8% surtax on investment income (including capital gains) that applies when your modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married filing jointly, or $125,000 for married filing separately. It's applied to the lesser of your net investment income or the amount MAGI exceeds the threshold.

Related Tools
Free tools by TUNA — energy supply from vetted manufacturers