Search code examples
excelmathoperator-precedence

Order of Operations Excel (different results, division / multiplication only)


Came across something interesting when evaluating figures using excel. I know that PEDMAS (order of operations) factors in, but why do I get different results for a calculation that involves only multiplication and division?

Figures:

A:  680464.73
B:  1,251,326,066.73
C:  1.022248108

Order of Operations

A / B * C = 0.000556
(A / B) * C = 0.000556

BUT:

A / (B * C) = 0.000532

Is this due to Excel losing precision?

Any help would be appreciated.


Solution

  • PEDMAS (or PEMDAS or BODMAS) states that, after doing parentheses (brackets) and exponentation, multiplication and division are done, from left to right. In other words, you do the leftmost multiplication or division, then the next one on the right, and so on.

    Your calculation A / (B * C) does not follow PEDMAS, since you did the multiplication, which is on the right, before the division, which is on the left. The correct order to calculate A / B * C is (A / B) * C. Therefore the values are different.

    Another way to look at it is the placement of C. In A / B * C or (A / B) * C, C is in the numerator of the fraction. In A / (B * C), C is in the denominator. Moving C from numerator to denominator will change the value of the calculation, unless C happens to equal one. In your example, C is almost one, so the value was changed only slightly.

    So Microsoft Excel does follow PEDMAS.