How to Calculate Crypto Profit and Loss After a Partial Sell
Last updated: November 10, 2026
Key Takeaways
- Profit is calculated on the amount sold, not the whole holding.
- Match basis to the sold quantity using the lot rule your records and tax rules support.
- Unsold coins retain the portion of basis not assigned to the sale.
- The gain formula stays the same; the allocation step changes.
Quick Answer
You calculate profit on a partial crypto sale by subtracting the allocated cost basis for the quantity sold from the sale proceeds for that same quantity. In a 10-unit example, selling 4 units leaves 6 units and 600 of basis behind if the original basis was 1,000.
A partial disposal calculation is the right way to work out profit and loss when you sell only some of a crypto holding. In the context of how to calculate profit and loss on crypto after a partial sell, you split the original cost basis between the coins sold and the coins you keep, then compare the sold portion’s basis with its sale proceeds.
For guidance on lot identification and basis reporting, see the IRS digital assets pages and HMRC’s cryptoassets manual. Crypto tax rules, lot methods, and reporting rules differ by country and change often, so a qualified adviser or tax professional should review your own situation.
Who this applies to, and what you need before you start
This applies if you bought one coin or token in one or more transactions and later sold only part of it. It also applies if you used a tracking app, an exchange export, or a spreadsheet and need to separate the realized portion from the remaining lots. The method works whether you use FIFO, first in, first out, or average cost basis, as long as you apply the same method consistently where your local rules require it.
You need four things before the math makes sense: the purchase dates, the quantity acquired, the total cost basis for each lot, and the quantity sold. A lot is one purchase batch with its own acquisition date and cost. If you bought 2.0 ETH on one day and 1.5 ETH on another, those are separate lots unless your jurisdiction allows pooling.
This page is for the partial disposal calculation itself, not for choosing tax lot methods or filing a return. It is also not the right tool if you have a full-position sale, a token swap that counts as a disposal in your country, staking rewards, airdrops, or wrapped-token conversions. Those can change basis rules and holding periods in ways a simple partial-sell worksheet will miss. For the broader context, this page sits under the larger guide to how to calculate crypto profit and loss.
How do you calculate profit after selling part of a coin?
You calculate profit on the amount sold, not on the whole holding. The key formula is:
Realized gain or loss = sale proceeds for the sold quantity − allocated cost basis for that sold quantity
Start with the sale proceeds, which are the gross amount you received before fees unless your tax rules treat fees differently. Then assign part of your original basis to the units sold. The remaining basis stays with the unsold units and becomes the basis for the leftover lot or lots.
For authoritative background on cost basis and disposal reporting, see IRS Publication 544 and HMRC’s cryptoassets guidance. In practice, you should confirm the fee treatment with a tax professional if your jurisdiction is not explicit.
Here is the cleanest way to do it with a single lot:
- Buy 10.0 units for 1,000.
- Sell 4.0 units for 600.
- Cost per unit is 100.
- Basis assigned to the sale is 4 × 100 = 400.
- Realized gain is 600 − 400 = 200.
- Remaining basis is 1,000 − 400 = 600.
- Remaining quantity is 6.0 units, with 600 of basis attached.
That is the core idea. The sold portion produces a realized gain or loss; the unsold portion keeps its share of the original cost basis. If you stop at “I sold 40% of the coin, so I made 40% of the total profit,” you can be wrong if fees, multiple lots, or different acquisition prices are involved.
If you sold less than you bought, the math still works. If you sold more than one original lot, the allocation step becomes the main job. That is where most spreadsheet errors begin.
How do you split cost basis after selling part of a coin?
You split cost basis by the rule that matches your lot method, then assign that basis to the exact quantity sold. The two common approaches are specific lot tracking, where you identify which units were sold, and pooled methods such as average cost basis. FIFO is another common rule: the earliest acquired units are treated as sold first, subject to the rules that apply in your jurisdiction.
Here is the step-by-step partial disposal calculation.
- List each acquisition lot separately. Write down the date, quantity, and total cost for each purchase, such as 1.2 BTC bought on one date for 18,000 and 0.8 BTC bought later for 14,000. Verify that every lot has a quantity and a cost; a missing fee or deposit cost means the basis is incomplete.
- Choose the lot method your tax rule requires. Use FIFO, specific identification, or average cost basis only if your local rules allow it. Verify the method before the sale is reported; switching methods after the fact can make the numbers inconsistent or unusable.
- Match the sold quantity to the right lot or pool. If you sold 0.5 BTC under FIFO, assign it to the earliest 0.5 BTC available. Verify that the sold quantity does not exceed what was available in the selected lot. If it does, the lot match is wrong or the records are incomplete.
- Compute unit cost. Divide the lot’s total basis by its quantity, such as 18,000 ÷ 1.2 = 15,000 per BTC. Verify the unit cost against your records. If the result looks distorted, check whether trading fees, gas fees, or transfer fees belong in basis under your rules.
- Allocate basis to the sold quantity. Multiply the unit cost by the number of units sold. For 0.5 BTC at 15,000 per BTC, the allocated basis is 7,500. Verify that the allocated basis plus the remaining basis equals the original lot basis, aside from any rounding permitted by your system.
- Calculate sale proceeds for the same quantity. Use the sale price for the 0.5 BTC, minus selling fees if your jurisdiction treats them that way. Verify that the proceeds and basis refer to the same slice of the trade. Mixing gross proceeds with net basis is a common error.
- Subtract basis from proceeds to get realized profit or loss. If proceeds are 8,200 and allocated basis is 7,500, the realized gain is 700. Verify the sign: positive means gain, negative means loss. A sign error is often the first clue that quantity or fee math went wrong.
- Carry the leftover basis forward. Subtract the sold basis from the original basis to get the remaining cost basis for the unsold units. Verify that the unsold quantity and remaining basis still agree with each other. If the numbers no longer line up, the spreadsheet needs to be repaired before the next sale.
A useful check is the conservation test: original basis should equal realized basis plus remaining basis. This is especially useful for pooled holdings or average cost basis because the unsold units no longer have their own separate purchase prices.
What happens to the remaining coins after a partial sell?
The remaining coins keep the unallocated portion of the original basis. They do not become “free” just because you sold part of the position, and they do not inherit the sale price. They remain open inventory, with their own residual cost basis and, where relevant, their original acquisition date or pooled holding-period treatment, subject to the reporting rules that apply to you.
If you sold part of a lot, the remainder of that lot keeps the same unit basis. In the 10-unit example above, after selling 4 units, the 6 remaining units still carry 600 of basis, or 100 per unit. If you sold from a FIFO pool, the remaining later lots stay untouched until an earlier lot is fully used up. If you use average cost basis, the per-unit basis stays the same across the pool until another acquisition changes the average.
Many calculators show the realized gain on the sale and then drop the leftover holding on the floor. That leaves your next sale wrong, because the next calculation starts with the wrong basis. The leftover basis matters as much as the realized gain.
There are two practical checks here. First, the remaining quantity should equal original quantity minus sold quantity. Second, the remaining basis should equal original basis minus the basis allocated to the sold units. If either check fails, the disposal was misallocated.
If your records include network fees, exchange fees, or transfer fees, handle them consistently. Some systems include certain fees in basis; others treat them as separate transaction costs. The important part is consistency with the rules that apply to you, not improvising a new method midway through the year. That is one reason tax software exports and manual spreadsheets disagree by a small amount such as 1 or 2 units of local currency.
What changes when you use FIFO or average cost basis?
The arithmetic changes in the allocation step, not in the gain formula. You still calculate realized gain as proceeds minus allocated basis. What changes is how you decide which basis is allocated to the sale.
With FIFO, the first units bought are treated as the first units sold. That means an earlier, cheaper lot can produce a larger gain if the market price rose before you sold. If you bought 1 ETH at 1,000 and later 1 ETH at 2,000, then sold 1 ETH, FIFO assigns the 1,000 basis first. The remaining 1 ETH keeps the 2,000 basis. The result can differ sharply from specific lot tracking if you would have chosen the later lot instead.
With average cost basis, you pool the holdings and divide total basis by total quantity. If the pool has 3 ETH with 6,000 of basis, the average basis is 2,000 per ETH. Selling 0.75 ETH allocates 1,500 of basis to the sale and leaves 4,500 of basis in the pool. This method is common in some contexts, but it is not universal and may not be allowed for every asset or every jurisdiction.
Specific identification sits in the middle. You identify the exact lot or lots sold, usually by date, wallet, or exchange record. That can be cleaner for detailed records, but it also asks more of your bookkeeping. If you cannot identify the sold units, you may be forced into FIFO or another default rule.
The right method is not the one that produces the number you like. It is the one your tax rules require and your records can support. If you are unsure which method applies, that is where a qualified tax adviser is worth the fee, especially if the holdings span multiple exchanges or wallets. For more on method choice, see the IRS guidance on digital assets and HMRC’s manual.
When should you stop doing this yourself?
You should stop the simple worksheet approach when the trade history stops behaving like one clean purchase and one clean sale. The math is straightforward; the records are what usually break it.
Multiple wallets or exchanges are involved: your basis may be split across platforms, and transfers can be mistaken for buys or sells — consolidate the records before calculating anything further.
You cannot tie a sale to a specific lot under your rules: FIFO or another default method may apply — do not guess the lot, because a guessed lot creates a false gain or loss.
Your transaction includes staking rewards, airdrops, or wrapped assets: the basis rules may differ from a plain spot purchase — separate those events before you calculate the disposal.
The sale is only part of a token that changed form: a bridge, redenomination, or token split can change quantity and basis treatment — confirm whether it is a taxable disposal where you live.
Your spreadsheet shows a basis mismatch after a partial sale: the remaining basis no longer reconciles to the original basis — stop and audit the prior transactions before you use the numbers for filing.
Your jurisdiction has special digital-asset rules or reporting forms: the calculation may need extra fields, dates, or classification — a local professional should review the result before you rely on it.
If any of those apply, the partial disposal calculation is still useful, but only after the underlying records are cleaned up. A tidy workbook with one bad assumption can be more misleading than no workbook at all.
The mistakes people actually make, and what they cost
The biggest mistake is using the full sale price and full purchase cost as if the entire holding disappeared. That makes the gain look larger or smaller than it really is, and it leaves the remaining coins with no basis. The correct alternative is to allocate only the sold portion’s basis and leave the rest on the books.
A second mistake is mixing gross and net figures. If sale proceeds are entered after fees but cost basis is entered before fees, the gain is distorted by the fee treatment rather than the market move. The correct alternative is to apply fees consistently, following the rule set you are using.
A third mistake is ignoring multiple lots and averaging them by eye. That can work in a 1-lot account and fail immediately once there are two acquisition dates. The correct alternative is to track each lot, or use average cost basis only where it is permitted.
A fourth mistake is forgetting the leftover basis. The sale may be recorded correctly, but the next sale starts from zero or from the original amount instead of the reduced amount. The correct alternative is to update both realized gain and remaining basis after every partial sell.
A fifth mistake is rounding too early. Rounding each line to whole dollars or whole cents before the final calculation can create a small mismatch, especially with many small trades. The correct alternative is to keep full precision in the worksheet and round only for reporting if the reporting standard allows it.
The quick way to check your numbers before you file
Your numbers are probably consistent if the sold basis, remaining basis, and original basis still reconcile exactly or within the rounding rules of your system. A short check catches most partial-disposal errors in under 5 minutes.
First, confirm that original quantity = sold quantity + remaining quantity. Second, confirm that original basis = allocated basis to the sale + remaining basis. Third, confirm that realized gain = sale proceeds − allocated basis. If those three relationships hold across all lots, the partial disposal calculation is probably sound.
One more check helps with FIFO and pooled methods: compare the average basis per unit before and after the sale. Under FIFO, the per-unit basis of the remaining lots can change because you removed earlier inventory first. Under average cost basis, the per-unit basis stays constant for the remaining pool until a new purchase changes it. If your workbook shows the numbers drifting outside the expected rounding range, revisit the lot assignment before you file.
Related resources
- How to calculate crypto profit and loss
- Crypto tax lot methods explained
- Crypto transaction fee handling
- Crypto cost basis tracking spreadsheet
Sources
- IRS: Digital Assets
- IRS Publication 544, Sales and Other Dispositions of Assets
- HMRC: Cryptoassets Manual
Drafted with AI; not yet reviewed by a person.