Forum Discussion
Simon55
Dec 08, 2025Copper Contributor
Excel cell calculation
Hi all, first timer here. In Mac Excel I’m wanting to calculate a selling price minus a cost price times the amount of items. So cell D4 is $3, minus cell C4 which is $1, multiplied by 18 items B4....
OlufemiO
Dec 09, 2025Brass Contributor
HiSimon55
welcome!
The issue is with the way Excel handles the order of operations. Multiplication happens before subtraction, so your formula:
=D4-C4*B4
is being calculated as:
= D4 - (C4 * B4)
= 3 - (1 * 18)
= -15
What you actually want is the difference between selling price and cost price, multiplied by the number of items. To make sure Excel does that, add parentheses:
=(D4 - C4) * B4
That gives:
= (3 - 1) * 18
= 36
So the fix is simply to use parentheses to control the calculation order.