Categories
Crypto

I’m working on an Excel portfolio and for some reason my calculations are always slightly off from what I see on Koinly.

Assume we have the following transactions.

Type Input Output Fee Transaction Cost Basis Holdings Cost Basis
Buy $28.23 DOGE 2,880.84643012 $0.60 $28.83
Buy $164.26 DOGE 12,743.95948130 $2.81 $167.07
Sell DOGE 5,147.28504105 $200 $3.95 $200 $68.16

Koinly calculates a cost basis for the sale at $68.16 which gives a gain of $131.84.

In my excel, I end up with a cost basis of $64.53540257 which gives a profit of $135.4645974

My formula for calculating the holdings cost basis at the time of the sale is as follows.

Previous Transactions Cost Basis Total / Total Holdings at Time of Sale * Amount that is being Sold

So with the values that would be

($28.83 + $167.07) / (2,880.84643012 + 12,743.95948130) * 5,147.28504105 = $64.53540257

I’m guessing it’s something with the fee that’s throwing it off. Just for fun, I tried adding the fee of the sale to my calculated holdings cost basis ($64.53 + $3.95) but this ends up at $68.48.

Idk what I’m missing here. Does Koinly maybe do cross-calculation with P/L of the fee asset/value and adds/deducts this from the final P/L of a sale?

Thanks for any help!

submitted by /u/_youarewhatyouyeet
[link] [comments]

Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more!

https://t.me/smashbotcommunity

Start Trading Now:

SmashBotAI Telegram Bot

Claim Your $SMASH Airdrop Now!

Leave a Reply

Your email address will not be published. Required fields are marked *

Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more! https://t.me/smashbotcommunity

Start Trading Now:
SmashBotAI Telegram Bot

Claim Your $SMASH Airdrop Now!

Categories