Taxes only apply to positive gains. Losses may provide tax benefits but aren't taxed.
Understanding the Inputs
What each parameter means
Cost Basis
Total amount paid to acquire shares, including any buy-side fees.
Sell Proceeds
Total amount received from selling shares before any fees.
Fees/Commission
Transaction costs on the sell side—brokerage and regulatory fees.
Tax Rate
Your capital gains tax rate (depends on holding period and income).
The Definitive Guide to Capital Gains & Losses: Maximizing After-Tax Returns
It's not what you make, it's what you keep. Learn how to calculate realized gains, estimate your tax bill, and strategically use losses to your advantage.
A capital gain occurs when you sell a capital asset (stocks, bonds, real estate, crypto) for more than its adjusted cost basis. It is the "profit" portion of your sale.
Crucial Distinction: You only pay taxes on realized gains (when you sell). Paper gains (increase in value while holding) are not taxed, allowing your money to compound tax-deferred.
The IRS incentivizes long-term investing by offering preferential tax rates.
Short-Term (Held ≤ 1 Year)
Taxed as Ordinary Income. This is added to your wages/salary and taxed at your marginal bracket (ranging from 10% to 37% in the US). It's the most expensive type of gain.
Long-Term (Held > 1 Year)
Taxed at Capital Gains Rates. For most people, this is 15%. For lower incomes, it can be 0%. For high earners, it caps at 20%. This discount is significant—often half the tax rate of short-term gains.
Capital Losses and Tax Benefits
Losses are painful, but they have a silver lining: they lower your tax bill.
Offset Gains: Losses first offset gains of the same type (short vs. short), then the other type.
Deduction Limit: If your losses exceed all your gains for the year, you can deduct up to $3,000 of the excess loss against your regular job income.
Carryover: Any loss remaining after that carries forward to future years indefinitely. You never "lose" a loss deduction until it's used.
Calculating Net Proceeds
Investors often focus on the "Gross" sale amount. But your bank account only sees the "Net."
Net Proceeds = Sell Price - Broker Commissions - Regulatory Fees - Estimated Taxes. This calculator helps you see that final, real number.
Tax Minimization Strategies
Tax-Loss Harvesting
Subjectively "harvesting" losses involves selling losing positions before year-end to offset realized gains elsewhere in your portfolio. Just beware of the Wash Sale Rule.
Holding On
Simply waiting until the 1-year mark passes before selling can boost your after-tax return by 10-20% purely due to the lower tax rate.
Frequently Asked Questions
Detailed answers about capital gains
What is cost basis?
Cost basis is your total acquisition cost—the purchase price plus any commissions and fees you paid when buying. This is the baseline against which gains or losses are calculated. You subtract this from your sale price to find your profit.
Does the "Net Investment Income Tax" (NIIT) apply?
High-income earners (Modified AGI > $200k single/$250k married) may face an additional 3.8% surtax on investment income (including capital gains) on top of the standard capital gains rates. This calculator estimates standard rates; be sure to factor in NIIT if you are a high earner.
Do I pay state taxes on capital gains?
Most individual US states tax capital gains as regular income. Some (like California) have high rates (up to 13.3%), while others (like Florida, Texas) have 0%. You must stack your state tax rate on top of the federal rate to get your true liability.
What's the difference between short-term and long-term gains?
Short-term: Held for 1 year or less. Taxed at ordinary income rates (expensive). Long-term: Held for more than 1 year (at least 1 year and 1 day). Taxed at preferential rates (0%, 15%, 20%). Holding for that extra day matters!
How does this apply to Cryptocurrency?
In most jurisdictions (including the US), crypto is treated as property. Every trade (crypto-to-fiat OR crypto-to-crypto) is a taxable event triggering a capital gain or loss calculation. You need to track the cost basis of every coin individually.
Does this work for Real Estate?
Yes, the math is the same (Sale - Cost - Expenses). However, real estate has a special exclusion for primary residences (Section 121 in the US) where you can exclude up to $250k/$500k of gains. This calculator doesn't auto-apply that exclusion.
Do fees reduce taxable gain?
Yes! Transaction costs are deductible from your profit. If you bought at $1,000, paid $10 fees, sold at $1,200 with $10 fees, your taxable gain is $1,200 - $1,010 - $10 = $180, not $200. Always track your fees.
What about wash-sale rules?
If you sell at a loss and repurchase the same (or substantially identical) security within 30 days, the loss is disallowed for tax purposes. The loss isn't lost forever; it's added to the cost basis of the new shares, deferring the tax benefit until you finally sell the new position.
Summary
The Capital Gain/Loss Calculator determines your profit or loss, estimates taxes owed, and calculates net proceeds from a stock sale.
Taxes only apply to positive gains—losses can offset gains or provide income deductions.
Use this to understand the true after-tax outcome of selling your investments.
Embed This Calculator
Add this calculator to your website or blog using the embed code below:
<div style="max-width: 600px; margin: 0 auto;">
<iframe
src="https://mycalculating.com/category/finance/capital-gain-loss-calculator?embed=true"
width="100%"
height="600"
style="border:1px solid #ccc; border-radius:8px;"
loading="lazy"
title="Capital Gain Loss Calculator Calculator by MyCalculating.com"
></iframe>
<p style="text-align:center; font-size:12px; margin-top:4px;">
<a href="https://mycalculating.com/category/finance/capital-gain-loss-calculator" target="_blank" rel="noopener">
Use full version on <strong>MyCalculating.com</strong>
</a>
</p>
</div>
Estimate gross gain/loss, tax owed on gains, and net proceeds from a sale.
How to use Capital Gain / Loss Calculator
Step-by-step guide to using the Capital Gain / Loss Calculator:
Enter your values. Input the required values in the calculator form
Calculate. The calculator will automatically compute and display your results
Review results. Review the calculated results and any additional information provided
Frequently asked questions
How do I use the Capital Gain / Loss Calculator?
Simply enter your values in the input fields and the calculator will automatically compute the results. The Capital Gain / Loss Calculator is designed to be user-friendly and provide instant calculations.
Is the Capital Gain / Loss Calculator free to use?
Yes, the Capital Gain / Loss Calculator is completely free to use. No registration or payment is required.
Can I use this calculator on mobile devices?
Yes, the Capital Gain / Loss Calculator is fully responsive and works perfectly on mobile phones, tablets, and desktop computers.
Are the results from Capital Gain / Loss Calculator accurate?
Yes, our calculators use standard formulas and are regularly tested for accuracy. However, results should be used for informational purposes and not as a substitute for professional advice.