Calculate capital gains tax from buy and sell prices, shares and holding period — see gain, tax and net.
Calculate capital gains tax from buy and sell prices, shares and holding period — see gain, tax and net.
Enter values above and click Calculate — results will appear here with the formula explained.
Capital gain is sale proceeds minus cost basis, times shares: buying 100 shares at $50 and selling at $80 yields a $3,000 gain. Short-term gains (assets held one year or less) tax as ordinary income at 10–37%; long-term gains (over one year) get preferential 0%, 15% or 20% rates by income — the single biggest lever in this entire topic, worth thousands on typical stock sales.
Cost basis is where most filers err: it's purchase price plus commissions and fees, adjusted for splits, dividends reinvested (each reinvestment raises basis), wash-sale deferrals and gifted/inherited step-ups. Broker 1099-B figures are usually right for covered shares but pre-2011 lots, transfers and crypto require manual reconstruction — wrong basis means wrong tax.
Loss harvesting turns losers into assets: realized losses offset gains dollar-for-dollar, plus up to $3,000 yearly against ordinary income, with excess carried forward indefinitely. December selling of losers while deferring winners into January is textbook timing; wash-sale rules (repurchasing substantially identical securities within 30 days) defer — not destroy — the loss, so mind the window.
State taxes stack on top: 0% in Texas/Florida/Washington, 13.3% in California — a 15% federal long-term rate becomes 28.3% combined in California. High earners also face the 3.8% Net Investment Income Tax above MAGI thresholds ($200k single/$250k joint). Enter your combined rate here for the honest number.
Holding-period planning beats rate shopping: one day past the one-year mark can halve the rate (37% to 20% at top brackets). Before selling, check the acquisition anniversary; employee stock (RSUs vest as income, ISOs/ESPPs carry qualifying-disposition rules) and crypto (same capital rules, no wash-sale rule currently — a loophole Congress revisits) each add wrinkles worth professional review.
This is a planning estimate, not tax advice. State regimes, NIIT thresholds, AMT interactions and special assets (collectibles 28%, Section 1202 QSBS exclusions, Opportunity Zones) all shift real liability — confirm material sales with a CPA.
Calculate capital gains tax from buy and sell prices, shares and holding period — see gain, tax and net. Formula: Gain = (sell-buy)*shares. Example: Buy 100 at $50, sell at $80: gain $3,000.
Capital gain is sale proceeds minus cost basis, times shares: buying 100 shares at $50 and selling at $80 yields a $3,000 gain. Short-term gains (assets held one year or less) tax as ordinary income at 10–37%; long-term gains (over one year) get preferential 0%, 15% or 20% rates by income — the single biggest lever in this entire topic, worth thousands on typical stock sales.
Cost basis is where most filers err: it's purchase price plus commissions and fees, adjusted for splits, dividends reinvested (each reinvestment raises basis), wash-sale deferrals and gifted/inherited step-ups. Broker 1099-B figures are usually right for covered shares but pre-2011 lots, transfers and crypto require manual reconstruction — wrong basis means wrong tax.
Loss harvesting turns losers into assets: realized losses offset gains dollar-for-dollar, plus up to $3,000 yearly against ordinary income, with excess carried forward indefinitely. December selling of losers while deferring winners into January is textbook timing; wash-sale rules (repurchasing substantially identical securities within 30 days) defer — not destroy — the loss, so mind the window.
State taxes stack on top: 0% in Texas/Florida/Washington, 13.3% in California — a 15% federal long-term rate becomes 28.3% combined in California. High earners also face the 3.8% Net Investment Income Tax above MAGI thresholds ($200k single/$250k joint). Enter your combined rate here for the honest number.
Holding-period planning beats rate shopping: one day past the one-year mark can halve the rate (37% to 20% at top brackets). Before selling, check the acquisition anniversary; employee stock (RSUs vest as income, ISOs/ESPPs carry qualifying-disposition rules) and crypto (same capital rules, no wash-sale rule currently — a loophole Congress revisits) each add wrinkles worth professional review.
This is a planning estimate, not tax advice. State regimes, NIIT thresholds, AMT interactions and special assets (collectibles 28%, Section 1202 QSBS exclusions, Opportunity Zones) all shift real liability — confirm material sales with a CPA.
Buy 100 at $50, sell at $80: gain $3,000. Long-term at 15% federal: tax $450, net $2,550. In California add 13.3% ($399) for $849 total; a short-term seller at 32% pays $960 federal alone — holding period was worth $510 here.
Formulas are standard public references (see our methodology). External standards are cited in the text where they apply.
Last reviewed: September 2026 · Report an error