Spreadsheet calculations - Order of Precedence
Formulas containing more than one arithmetic operator follow the order of precedence. A spreadsheet performs its calculations based on the following order:
- Order (e.g. Exponents or powers)
One way to remember this is to remember the word BODMAS spelt out by the initial letters.
Brackets have the highest precedence (or priority) while subtraction has the lowest. For example: in the formula 5 + 2 * 3, Open Office performs multiplication first (2*3) and addition after (5 + 6) for a result of 11. To change the order of precedence, use parentheses () in a formula.
A spreadsheet will calculate operations within parentheses first. For example ( 5 + 2) * 3 will give a result of 21. All calculations, whether the device is a hand held calculator, or a computer use a very similar set of rules.