Capital Gains Tax Calculator
Quickly compute capital gains tax with accurate formulas. See amortization schedules, growth projections, and side-by-side comparisons.
Reviewed by Sahil, Senior Finance & Tax Editor
Formula
Capital Gain = Sale Price - Purchase Price | Long-term (>12mo): 0/15/20% | Short-term (≤12mo): Ordinary income rate
Long-term capital gains (held >12 months) are taxed at 0%, 15%, or 20% depending on income. Short-term gains are taxed as ordinary income.
Worked Examples
Example 1: Stock sale
Problem:Buy $10K, sell $15K after 18 months, 22% bracket
Solution:Gain=$5K, long-term, 15% rate → Tax=$750, Net=$4,250
Result:$750 tax, $4,250 net
Frequently Asked Questions
What's the difference between short-term and long-term capital gains, and why does the holding period matter so much?
Assets held one year or less generate short-term capital gains, taxed at your ordinary income tax rate — potentially as high as the top marginal bracket. Assets held for more than one year qualify for long-term capital gains treatment, taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income, which can be dramatically lower than your ordinary rate. Holding an appreciated asset just a bit longer to cross the one-year mark can meaningfully reduce the tax owed on the same dollar gain.
Can capital losses offset capital gains, and how much excess loss can I deduct against ordinary income?
Capital losses first offset capital gains of the same type (short-term losses against short-term gains, long-term against long-term), with any remaining net loss then offsetting the other type. If total losses still exceed total gains, up to a set annual limit (commonly $3,000, $1,500 if married filing separately) can be deducted against ordinary income, with any further excess carried forward to future tax years indefinitely.
What is the Net Investment Income Tax and who has to pay it?
The Net Investment Income Tax (NIIT) is an additional 3.8% surtax on net investment income — including capital gains, dividends, and interest — for taxpayers whose modified adjusted gross income exceeds set thresholds (commonly $200,000 for single filers, $250,000 for married filing jointly, not indexed for inflation). It applies on top of standard capital gains tax rates for higher-income investors.
How are capital gains on the sale of a primary home taxed differently from investment property?
Sellers of a primary residence who meet ownership and use tests (generally living in the home 2 of the last 5 years) can exclude up to $250,000 of gain ($500,000 for married couples filing jointly) from capital gains tax entirely. Investment or rental properties don't qualify for this exclusion and are also subject to depreciation recapture, taxed at a different rate on the portion of gain attributable to prior depreciation deductions.
Reviewed by Sahil, Senior Finance & Tax Editor · Editorial policy