Don’t understand that question. You want to calculate a fee (as per your initial statement), which from my understanding of the word “fee” is an addition to the price given by A1*A2, while your last statement uses the word substract (typo ?!), which lets me take into account that you are talking about a discount.

In addition: Are your really talking about 0.15% = 0.0015 discount/fee or do you mean 15% = 0.15 discount/fee.

Let p the percentage of the fee/discount (p is either a positive number, if you want to calculate a fee or negative number if you want to calculate a discount - see comment above)

The fee/discount is: A1*A2*p
The total is: A1*A2+A1*A2*p = A1*A2*(1+p) and in terms of A3: put =A1*A2*(1+A3) into cell A4 (but take my comment into account)

By fee I mean maker/taker fees used in exchanges, for instance:

These orderbooks are equivalent to each other. To see that, imagine lifting the offer for 1 DASH. In option A you pay $100.80, plus an additional 0.06%*100.80 in fees, for a total of about $100.86. In option B, you’d pay $100.71 + 0.15%*100.71, again roughly $100.86. Similarly the amount you’d receive for selling DASH would be the same.

So yeah I guess it’s not substracting. It’s costing me extra (the fee) so im paying more, so I have to add. But as a result I get less of the asset, so it could also be 0.15% less of the asset you are buying for the price. Im not sure how to do this.

The idea is that every line represents a trade. In the example, I buy 2 BTC which at the date was 31,000€, which means 62.000€ total at the time. Then I have a cell (B3) that has the price in real time so I can monitor the return of investment. In the example you can see how these 2 BTC are now worth 72.750€, 17.29% gain and the last column I added to see the gains in € as well.

Now what I would need to be more precise is adding the fees so I have the “Fee” column there, at 0 because I don’t know how to add it. So since every exchange has a different fee, I added also a “exchange” column, in the example I used Bitpanda. So on the website you can see the fees:

So in this case im buying BTC so im “taking out” liquidity off the BTC pool so it should be 0.15% applied. So this means that I paid 62.000€ + 0.15% of 62.000€. So yeah, it should be to add and not substract. I think I was confused. It should get the net 2 BTC, not 2 BTC - 0.15%, so this means I get 2 BTC but I paid an extra 0.15%. I just don’t know how to fit in the Fee on the columns and make it understandable to keep track of how much I have paid in fees. It’s not much but I think this is deductible for taxes so I should keep track of it.