Updated Finance

Capital Gains Calculator

Estimate capital gains or losses with fees, holding periods, and tax rates. Model single trades or multiple lots using FIFO, LIFO, or Average Cost, and export results to CSV.

Net Gain/Loss Holding Period FIFO/LIFO Tax Estimate

Gain/Loss, Cost Basis & Tax Estimator

Calculate net proceeds, cost basis, capital gain/loss, holding period classification, and estimated tax impact. Includes lot methods and exports.

Edit lot rows below, then click Calculate Lots. Enter quantity, buy price, buy date, and optional buy fees per lot.
Lot # Buy Date Quantity Buy Price Buy Fees

What a Capital Gains Calculator Does

A Capital Gains Calculator estimates your profit or loss when you sell an asset. It compares your net proceeds from the sale against your cost basis (what you paid, plus eligible costs). The difference is your capital gain or capital loss. This tool also helps you model how fees change the outcome, how long you held the asset, and how different cost basis methods like FIFO, LIFO, or Average Cost can change reported gains when you have multiple purchase lots.

Capital gain calculations are used for many asset types: stocks, ETFs, mutual funds, crypto assets, collectibles, and sometimes real estate and business assets. While the math of profit and loss is consistent, tax treatment can differ based on jurisdiction, account type, and local reporting rules. This calculator focuses on transparent planning math and simple rate-based tax estimates.

Key Terms: Proceeds, Cost Basis, and Net Gain

To estimate a capital gain, you need two numbers: proceeds and cost basis. Proceeds are what you receive when you sell, typically calculated as quantity × sell price, minus selling fees. Cost basis is what you paid, typically quantity × buy price, plus eligible buying fees. The net gain (or loss) is proceeds minus cost basis.

Net Proceeds: (Qty × Sell Price) − Sell Fees
Cost Basis: (Qty × Buy Price) + Buy Fees
Gain/Loss: Net Proceeds − Cost Basis

If the result is positive, you have a gain. If it is negative, you have a loss. Losses can sometimes offset gains depending on local rules, but those rules vary. This tool treats gains and losses as raw outputs so you can plan scenarios clearly.

Why Fees Matter More Than Many People Expect

Fees reduce returns in two places: buying fees increase cost basis and selling fees reduce proceeds. Even if fees look small, they can significantly reduce gains for short-term trades or low-volatility assets. They can also turn a small gain into a loss. Modeling fees is essential for realistic planning, especially in markets with spreads, maker/taker fees, or high slippage.

Holding Period: Short-Term vs Long-Term Planning

Many tax systems treat gains differently based on how long you held the asset. This tool calculates a holding period in days between your buy date and sell date, then labels the result as short-term or long-term using a selectable threshold. You can use a 365-day rule, a 366-day rule, or a custom threshold based on your needs.

The holding period classification is especially useful for planning: sometimes waiting a little longer can move a gain into a different category in certain jurisdictions. Always confirm local rules for your specific situation before relying on a threshold assumption.

Multiple Lots: Why FIFO vs LIFO vs Average Cost Changes Results

If you bought an asset in multiple transactions at different prices, your cost basis depends on which units you are considered to have sold. Cost basis methods are a way of deciding which purchase lots are applied to the sale:

  • FIFO (first-in, first-out): oldest purchases are sold first
  • LIFO (last-in, first-out): newest purchases are sold first
  • Average cost: uses an average purchase price across shares

In rising markets, FIFO often results in higher taxable gains because older lots tend to have lower buy prices. LIFO can reduce reported gains in some scenarios by applying higher-cost newer lots first. Average cost smooths the basis, which can be helpful for certain planning purposes, but may not match the allowed method for your asset type or jurisdiction.

Tax Rate Estimates and After-Tax Outcomes

This calculator supports simple tax estimates by applying a rate to net gains. For single sales, you can enter a single estimated tax rate. For multiple lots, you can enter separate long-term and short-term rates so gains from lots with different holding periods can be estimated separately. The Tax Scenarios tab lets you test multiple rates quickly to see how sensitive your after-tax result is to the rate assumption.

Tax outcomes can be more complex in reality due to brackets, offsets, exemptions, deductions, wash-sale rules, residency, account type, and jurisdiction-specific adjustments. Use the tax section as a planning lens, not a filing result.

How to Use This Capital Gains Calculator

If you have a single buy and sell transaction, use the Single Sale tab. Enter buy date, sell date, quantity, prices, and fees. Review cost basis, net proceeds, gain/loss, holding period, estimated tax, and after-tax result.

If you have multiple purchase lots, use the Lots tab. Enter your lots (quantity, buy price, buy date, and fees), then enter the total quantity sold and your sell price. Choose FIFO, LIFO, or Average Cost. The tool will show an applied-lot breakdown and separate long-term vs short-term gains, along with an estimated tax amount.

If you want to quickly compare tax rates, use Tax Scenarios. Finally, use the Schedule / Export tab to export the last computed output table as CSV for tracking, journaling, or spreadsheet analysis.

Limitations and Assumptions

This tool does not model complex tax rules, brackets, offsets, wash-sale rules, loss harvesting constraints, or jurisdiction-specific reporting requirements. It also does not model currency conversion or cost adjustments beyond fees. Use it for planning and consult qualified professionals for filing decisions.

FAQ

Capital Gains Calculator – Frequently Asked Questions

Answers to common questions about cost basis, holding periods, fees, lot methods, and tax estimates.

A capital gain is the profit you earn when you sell an asset for more than its cost basis (what you paid, including certain costs). If you sell for less, it is a capital loss.

Cost basis is generally the amount you paid for an asset plus eligible purchase-related costs. It determines your taxable gain or deductible loss when you sell.

Short-term and long-term capital gains are typically based on holding period. Long-term gains often receive different tax treatment than short-term gains, depending on your country’s tax rules.

Yes. Transaction fees can reduce your net proceeds or increase your cost basis, which changes the final gain or loss.

FIFO assumes the first shares you bought are sold first. LIFO assumes the last shares you bought are sold first. Different methods can change reported gains, especially with multiple lots.

Average cost basis uses an average purchase price across your shares to estimate cost basis. It’s commonly used for certain fund types in some jurisdictions.

No. This is a planning calculator. Tax rules vary by jurisdiction and account type. Use it for estimates and consult a qualified tax professional for filing decisions.

Yes. You can export lot-by-lot calculations and summary results to CSV for spreadsheets or reporting.

Yes for planning. The math is similar across assets, but tax treatment, allowable costs, and reporting rules can differ widely.

Estimates are for planning only. Tax rules vary by jurisdiction and account type. This calculator is not tax advice and is not a substitute for professional guidance.