How to Calculate Crypto Profit After Multiple Buys, Fees and Withdrawals

how to calculate crypto profit correctly using cost basis fees and portfolio data
0
9 Minutes

How to Calculate Crypto Profit: The Short Answer

To calculate crypto profit correctly, start with every buy, fee and sale—not the first price you remember. Add the cost of all purchases and buy fees to find your total cost basis, divide that basis by the units acquired, and then assign the correct share of that basis to any units you sell.

Total cost basis = sum of (units bought × purchase price) + buy fees
Average cost per unit = total cost basis ÷ total units acquired
Realized profit = net sale proceeds − cost basis of units sold
Unrealized profit = current value of remaining units − remaining cost basis

This page focuses on the detailed transaction method for multiple buys, fees, partial sales and transfers. If you need a broader explanation of profit, loss, ROI and break-even, begin with the Forvest crypto profit calculator guide.

Collect These Inputs Before You Calculate

Your result is only as reliable as the transaction record behind it. Use one base currency—such as USD—and record values at the time each transaction occurred.

Input What to record Why it matters
Buys Date, units, execution price and buy fee Builds the cost basis
Sales Date, units, execution price and sell fee Determines net proceeds and realized profit
Current holding Units still owned and current price Determines unrealized profit or loss
Deposits and withdrawals External cash or crypto entering or leaving the portfolio Prevents cash flow from being mistaken for performance
Transfers Sending wallet, receiving wallet and network fee Prevents the same asset from being counted twice
Base currency The same reporting currency for every row Keeps values comparable

Download the transaction history from each exchange and wallet when possible. A current balance alone cannot show which units were bought, sold or transferred.

How to Calculate Average Cost After Multiple Buys

When you buy the same asset at different prices, a simple average of the prices is usually wrong because each purchase may involve a different quantity. For performance tracking, a weighted average gives each purchase the correct influence.

Weighted average purchase price = total purchase value before fees ÷ total units bought

Buy fees can then be added to the total purchase value to calculate an all-in performance basis. For example, buying 0.025 BTC at $40,000 and 0.015 BTC at $50,000 does not produce a $45,000 average. The first purchase represents more units, so the weighted purchase price is $43,750 before fees.

Weighted average is useful for monitoring investment performance, but it is not automatically the tax-lot method you must use. FIFO, specific identification and other rules vary by jurisdiction and account. Keep the original transaction-level record even if your dashboard displays one blended average.

Worked Ledger: Multiple Buys, Fees and a Partial Sale

The following example uses USD, assumes every trading fee is paid in cash, and uses a weighted-average basis for performance analysis. Values are rounded only after the full calculation.

Action Units Price Gross value Fee Basis or net proceeds
Buy 1 0.025 BTC $40,000 $1,000.00 $5.00 $1,005.00 basis
Buy 2 0.015 BTC $50,000 $750.00 $3.75 $753.75 basis
Sell 0.010 BTC $55,000 $550.00 $2.75 $547.25 net proceeds

Before the sale, the investor owns 0.040 BTC with a total basis of $1,758.75. The all-in average cost is:

$1,758.75 ÷ 0.040 BTC = $43,968.75 per BTC

The 0.010 BTC sold therefore carries $439.69 of basis. Net proceeds are $547.25, so realized profit is:

$547.25 − $439.69 = $107.56 realized profit

After the sale, 0.030 BTC remains with $1,319.06 of basis. If BTC is now worth $52,000, the position is worth $1,560.00 and has $240.94 of unrealized profit before a future exit fee. If the expected exit fee is 0.5%, estimated after-fee unrealized profit falls to $233.14.

Result Amount Status
Realized profit $107.56 Created by the completed sale
Unrealized profit before estimated exit fee $240.94 Changes with the market price
Estimated unrealized profit after a 0.5% exit fee $233.14 Scenario estimate, not a completed result

This single ledger is easier to audit than a series of disconnected examples: every result traces back to units, prices and fees.

How to Calculate Profit After a Partial Sale

A partial sale creates two separate results. The sold portion produces realized profit or loss. The unsold portion retains a remaining cost basis and produces unrealized profit or loss as its market price changes.

Cost basis of units sold = units sold × applicable cost per unit
Remaining basis = basis before sale − basis assigned to units sold

Do not subtract the full sale proceeds from the remaining basis. Sale proceeds include both the recovery of basis and any profit or loss. Mixing those components can make the remaining position appear free or artificially cheap.

The applicable basis may also depend on the lot-selection method. The example above uses weighted average for performance tracking. For U.S. tax reporting, the IRS explains that qualifying transaction costs can affect basis or amount realized and that identification rules can determine which units are treated as sold. Other countries use different rules. Review the IRS digital asset transaction FAQs only as a U.S.-specific reference and obtain advice for your own jurisdiction.

Do Deposits, Withdrawals and Wallet Transfers Count as Profit?

No. Moving outside capital into a portfolio increases its value but does not create investment profit. Withdrawing capital reduces the account balance but is not automatically a loss.

Dollar profit for a period = ending value + external withdrawals − external deposits − starting value

This formula isolates the dollar change caused by investment performance when the cash-flow records are complete. It does not calculate a time-adjusted percentage return; irregular cash flows require a time-weighted or money-weighted method. The crypto ROI guide explains when a simple percentage becomes misleading, while the portfolio profit and loss guide covers multi-asset reporting.

A transfer between wallets you control should not be recorded as a new purchase in the receiving wallet or a sale in the sending wallet. Carry the original acquisition record across the transfer and record any network fee separately. A swap from one crypto asset to another is different from a self-transfer and may have reporting consequences depending on local rules.

How Fees Change Crypto Profit

At minimum, track buy fees and sell fees. Buy fees increase the capital required to establish the position. Sell fees reduce the amount you receive. Spreads, slippage, withdrawal fees and network fees can also create a gap between a displayed market-price result and the amount you could actually realize.

The SEC’s Investor.gov notes that fees and expenses reduce investment value over time. Its investor bulletin on fees and expenses is not crypto-specific, but the principle applies: compare results after relevant costs, not before them.

Keep fee treatment consistent. If your total basis already includes buy fees, do not add the same fee again in a calculator. If a fee is paid in crypto rather than cash, record both the quantity removed and its value in your base currency.

Use the Forvest Profit Calculator Without Double Counting

The Forvest Profit Calculator can estimate returns using a purchase date or manual purchase price, one or more selected cryptocurrencies, and separate investment and exit fee assumptions. It does not replace a complete transaction ledger or select tax lots for a partial sale.

For a position built through multiple buys, first calculate the weighted purchase price and total investment from your ledger. In the worked example before the partial sale, the purchase value is $1,750, the weighted purchase price is $43,750 and the combined buy fee is 0.5%. Enter those values once—rather than entering the $1,758.75 fee-inclusive basis and then applying the 0.5% fee again.

Forvest crypto profit calculator inputs for purchase price investment and fees

Use manual price for a blended entry, and keep the investment and fee inputs consistent with your ledger.

After a partial sale, model only the remaining open position if you want an unrealized-return estimate. Keep the realized sale in your ledger; the calculator is a scenario check, not the source of truth for transaction history.

Forvest crypto profit calculator result showing estimated profit and ROI after fees

Compare the calculator output with your independently calculated basis before relying on it.

Common Crypto Profit Calculation Mistakes

Mistake Why the result breaks Better approach
Using the first buy price Later purchases change the position Use quantity-weighted cost
Averaging prices without quantities A small and large purchase get equal weight Divide total purchase value by total units
Ignoring one side of the fees Net proceeds or basis is overstated Track entry and exit costs separately
Double counting fees The same cost appears in both basis and calculator inputs Choose one consistent treatment
Treating a deposit as profit External capital is confused with performance Separate cash flows from returns
Treating a wallet transfer as a sale Holdings and basis can be duplicated or lost Carry the acquisition record between wallets
Mixing realized and unrealized results A completed sale and an open position behave differently Report them on separate lines
Using a performance basis as tax advice Lot-selection rules vary by jurisdiction Retain raw records and verify local rules

A Reusable Calculation Workflow

  1. Export transactions from every exchange and wallet.
  2. Normalize timestamps and values into one base currency.
  3. Separate buys, sales, deposits, withdrawals, transfers and fees.
  4. Reconcile the calculated ending quantity with the quantity you actually hold.
  5. Calculate purchase value, total basis and cost per unit.
  6. Assign basis to units sold using the method appropriate to your purpose.
  7. Calculate realized profit and remaining unrealized profit separately.
  8. Use the Forvest calculator as a reasonableness check, then retain the ledger as your audit trail.

If the ending quantity does not reconcile, stop and find the missing trade, transfer, reward or fee. A polished percentage built on an incorrect quantity is still wrong.

Final Takeaway

The most reliable way to calculate crypto profit after multiple buys is to preserve the transaction trail. Weighted cost explains the blended position, partial sales separate realized from unrealized results, and cash-flow records prevent deposits or withdrawals from distorting performance.

Use calculators to test and communicate a scenario, not to replace the source ledger. That distinction becomes more important as the number of transactions, wallets and assets grows.

Disclaimer: This guide is for educational performance analysis and is not financial, accounting or tax advice. Crypto assets can be highly volatile and involve a significant risk of loss; see FINRA’s crypto asset risk overview and consult qualified professionals for rules that apply to you.

Frequently Asked Questions About Calculating Crypto Profit

Mobina Ebrahimii

Mobina Ebrahimi contributes across Forvest’s SEO, analytics, and content strategy teams. She focuses on improving visibility, performance, and investor engagement through data-driven optimization.

Related blogs

Crypto Portfolio Allocation Strategy: How to Balance Risk and Maximize Returns
May 17, 2026 14 Minutes

Crypto Portfolio Allocation Strategy: How to Balance Risk and Maximize Returns

Table of content How to Calculate Crypto Profit: The Short Answer Collect These Inputs Before You Calculate How to Calculate Average Cost After Multiple Buys Worked Ledger: Multiple Buys, Fees and a Partial Sale How to Calculate Profit After a Partial Sale Do Deposits, Withdrawals and Wallet Transfers Count as Profit? How Fees Change Crypto […]

Comments