Updated Capital Gains & Tax

Capital Gains Calculator

Estimate capital gains tax, compare short-term vs long-term gains, include brokerage fees, adjust cost basis, and plan tax-loss harvesting in one tool.

Capital Gain / Loss Tax Estimation Short vs Long Term Adjusted Cost Basis Tax-Loss Harvesting

Advanced Capital Gains Calculator

Switch between Standard Capital Gains, Short-Term vs Long-Term, Net Profit After Fees, Adjusted Cost Basis, and Tax-Loss Harvesting modes to analyze investment gains and potential tax impact.

This mode assumes a single blended capital gains tax rate. Actual tax treatment depends on your local rules and personal situation.

This mode uses a simple rule: if the holding period is less than one year, the gain is classified as short-term; otherwise as long-term. Local regulations may use different thresholds.

This mode focuses on the economics of the trade after fees and commissions. Tax is not included in this tab.

This mode uses a simple model: original basis plus additional costs minus reductions, spread over final quantity after any share changes.

This simplified model assumes realized gains can be offset by realized losses in the same year. Local tax rules, including wash-sale restrictions, may change how losses are treated.

Capital Gains Calculator – Tax, Profit and Adjusted Cost Basis

The Capital Gains Calculator helps you understand the full picture behind selling investments. Instead of manually crunching numbers, you can estimate capital gains tax, compare short-term and long-term classification, see how brokerage fees affect profit, adjust cost basis after changes, and evaluate the impact of tax-loss harvesting. It is designed for investors and traders who want clear, transparent numbers before they make decisions.

Whenever you sell an investment such as stocks, ETFs, mutual funds, crypto, real estate, or other capital assets, you may trigger a taxable event. The true outcome depends not only on your profit or loss, but also on holding period, cost basis, transaction costs and tax rules. This calculator does not replace professional advice, but it gives you a structured way to explore scenarios and plan ahead.

How the Capital Gains Calculator Works

The calculator is organized into five modes:

  • Standard Capital Gains: Estimate capital gain or loss, tax due and net profit after tax using a single rate.
  • Short-Term vs Long-Term: Classify the gain based on holding period and apply different tax rates.
  • Net Profit After Fees: Include buy and sell commissions and transaction fees to see true profit.
  • Adjusted Cost Basis: Recalculate cost basis after adjustments such as additional costs, reductions and share changes.
  • Tax-Loss Harvesting: Combine realized gains with potential realized losses to estimate how much tax you might save.

You can use each mode independently or combine insights: for example, use Adjusted Cost Basis to refine your cost basis, then plug the resulting figures into Standard Capital Gains mode.

Mode 1: Standard Capital Gains Tax Calculator

The Standard Capital Gains tab focuses on a single transaction with a single tax rate. You enter purchase price per unit, sale price per unit, quantity and a blended capital gains tax rate. The calculator returns proceeds, cost basis, gain or loss, estimated tax and net profit.

Core Capital Gains Formulas

Total Proceeds = Sale Price per Unit × Quantity
Total Cost Basis = Purchase Price per Unit × Quantity
Capital Gain / Loss = Total Proceeds − Total Cost Basis
Estimated Tax = max(Capital Gain, 0) × Tax Rate
Net Profit After Tax = Capital Gain / Loss − Estimated Tax

If the result is negative, you have a capital loss. While the calculator sets tax to zero for a loss in this mode, actual tax treatment of losses depends on your local rules, including how losses offset other gains.

Mode 2: Short-Term vs Long-Term Capital Gains

The Short-Term vs Long-Term tab adds holding period and different tax rates for each category. You enter purchase date, sale date, cost, sale price and quantity, along with short-term and long-term tax rates. The calculator determines the approximate holding period, classifies the gain and applies the appropriate rate.

Holding Period and Classification

Holding Period (Days) = Sale Date − Purchase Date

This holding period is converted into an approximate number of years by dividing by 365. A simple rule is used:

  • If holding days < 365 → short-term.
  • If holding days ≥ 365 → long-term.

In many tax systems, short-term gains are taxed more heavily, often like ordinary income, while long-term gains may benefit from reduced rates. The calculator reflects your input rates and uses the same gain formula as Standards mode, adjusting only the tax rate and classification label.

Mode 3: Net Profit After Brokerage Fees

Transaction costs can significantly reduce your profit, especially for frequent traders or small trades. The Net Profit After Fees tab lets you enter buy and sell commissions plus other transaction fees so you can see how much of your gain is consumed by costs.

Fees and Net Profit

Total Cost Basis = Purchase Price × Quantity + Buy Commission
Gross Proceeds = Sale Price × Quantity
Total Fees = Buy Commission + Sell Commission + Other Fees
Net Profit / Loss After Fees = Gross Proceeds − Total Cost Basis − Sell Commission − Other Fees

In practice, you may treat buy commission as part of cost basis and sell commission as a reduction of proceeds. This tab combines them to show a clear view of net outcome. You can then feed the resulting profit into your own tax calculations if needed.

Mode 4: Adjusted Cost Basis Calculator

Many investors face more complex situations than a simple buy and sell. Share splits, dividend reinvestments, return of capital distributions and additional costs can all change your cost basis. The Adjusted Cost Basis tab helps you understand how these adjustments change your effective cost per share.

Adjusted Basis Calculation

Original Total Basis = Original Price per Unit × Original Quantity
Adjusted Total Basis = Original Total Basis + Additional Costs − Reductions
Adjusted Cost per Unit = Adjusted Total Basis ÷ Final Quantity

Additional costs might include extra commissions, reinvested distributions that increase basis or certain improvements in real estate. Reductions might include returns of capital or adjustments that lower basis. Final quantity may change due to share splits, consolidations or dividend reinvestment. The calculator then shows how adjusted cost per unit compares with the original unit cost.

Mode 5: Tax-Loss Harvesting Calculator

Tax-loss harvesting is often used to reduce taxable capital gains by realizing losses on underperforming investments. The Tax-Loss Harvesting tab lets you enter your realized gains for the year plus one or two underwater positions. The calculator estimates how much loss you could harvest and how this could affect your tax bill.

Losses and Net Taxable Gain

Unrealized P/L per Position = (Current Price − Cost per Unit) × Quantity

Only negative P/L (losses) are treated as potential harvested losses. Total harvestable loss is the sum of these negative amounts. Net taxable gain after harvesting is:

Net Taxable Gain = Realized Gains − Total Harvestable Loss

If losses exceed gains, the net taxable gain becomes negative, indicating a net capital loss that may be carried forward or applied subject to local rules. The calculator then estimates tax savings as the difference between tax on original gains and tax on net taxable gain, using your input tax rate.

Why Use a Capital Gains Calculator?

Investment decisions are easier when you understand the numbers that sit behind them. A capital gains calculator can help you:

  • Estimate potential tax impact before selling an investment.
  • Compare short-term vs long-term sale timing options.
  • See how fees and commissions affect overall profitability.
  • Keep track of adjusted cost basis when there are changes over time.
  • Evaluate whether tax-loss harvesting might meaningfully reduce your tax bill.

Instead of guessing or using rough mental math, you get a structured breakdown of each component. This can support better planning across taxable brokerage accounts, investment portfolios and even more complex holdings.

Examples of Capital Gains Calculations

Example 1: Simple Capital Gain

You buy 100 shares at $30 and sell them at $45. Your total cost basis is $3,000, and total proceeds are $4,500. The capital gain is $1,500. With a 15% capital gains tax rate, estimated tax is $225, leaving net profit after tax of $1,275.

Example 2: Short-Term vs Long-Term

Suppose you bought shares on March 1, 2024 and sold them on February 15, 2025. That holding period is shorter than 365 days, so the gain is treated as short-term. If short-term gains are taxed at 30% and long-term at 15%, the same dollar gain would be taxed more heavily if sold before the one-year mark. Using the Short-Term vs Long-Term tab, you can see the tax difference and decide whether waiting might be worthwhile.

Example 3: Profit After Fees

You buy 300 units of an ETF at $80 with a $7 commission, then later sell at $85 with a $7 commission and $6 in other fees. Cost basis is $24,007, and gross proceeds are $25,500. Total fees are $20. Net profit after fees is $25,500 − $24,007 − $13 = $1,480. This is lower than the simple price-based gain, which would be ($85 − $80) × 300 = $1,500.

Example 4: Adjusted Cost Basis

Imagine you purchased 400 shares at $25, for a total basis of $10,000. Over time, you paid $40 in additional fees, and you received $200 of return of capital that reduces basis. Your adjusted total basis becomes $10,000 + $40 − $200 = $9,840. If splits and DRIPs resulted in a final share count of 600, the adjusted cost per share is $16.40 instead of the original $25. The Adjusted Cost Basis tab shows these numbers clearly.

Example 5: Tax-Loss Harvesting

If you realized $6,000 of capital gains this year and you hold an underwater position that cost $70 per share and now trades at $50 with 100 shares, your unrealized loss is ($50 − $70) × 100 = −$2,000. If you realize that loss and your tax rate is 20%, your net taxable gain becomes $4,000, and estimated tax falls from $1,200 to $800, saving $400 in tax. The Tax-Loss Harvesting tab illustrates this change.

How to Use This Tool Effectively

  • Use the Standard Capital Gains tab to quickly estimate tax and net profit for a simple buy-sell transaction.
  • Check the Short-Term vs Long-Term tab when timing a sale near your jurisdiction’s holding period threshold.
  • Rely on Net Profit After Fees to evaluate whether a trade remains attractive once transaction costs are considered.
  • Maintain accurate records in the Adjusted Cost Basis tab for assets subject to splits, reinvestment or returns of capital.
  • Use the Tax-Loss Harvesting tab for scenario analysis only and always review local tax rules, including restrictions on repurchasing securities.

Related Tools from MyTimeCalculator

For broader financial planning and analysis, you may also find these tools helpful:

Capital Gains Calculator FAQs

Frequently Asked Questions About Capital Gains

Find answers about capital gains tax, short-term vs long-term gains, fees, adjusted cost basis and tax-loss harvesting.

The calculator uses the tax rates you enter and simple formulas to estimate tax on gains. Actual tax may differ due to brackets, deductions, exemptions, local rules and your full financial situation. Treat the result as an estimate, not an official calculation.

The formulas are general enough to apply to many capital assets, such as stocks, ETFs, funds, some real estate scenarios and other investments. However, certain assets can have special tax treatment that is not fully captured here.

Many jurisdictions treat crypto disposals as capital gains events, so the calculator can help with basic scenario analysis. Always confirm your local rules, especially for frequent trading, staking, airdrops or DeFi activities.

This calculator assumes a single average price and quantity. In practice, your tax authority may require lot-level accounting such as FIFO, LIFO or specific identification. You can approximate by using an average price, but for official reporting, detailed records are important.

No. The tax-loss harvesting mode is simplified and does not enforce wash-sale or similar anti-avoidance rules. For accurate treatment of loss disallowance and repurchase windows, consult local regulations or a professional advisor.

No. The calculator is an educational tool, not tax software. You should use official forms, documentation and, if needed, professional advice when preparing and filing tax returns.