Order of operations
When calculations have more than one operation, we have to follow rules for the order of operations:
Step 1:
From left to right, do all multiplication and division.
Step 2:
From left to right, do all addition and subtraction.
However, if there are parentheses or other types of brackets, do all operations that lie inside them first:
The order of operations also applies while working inside parentheses:
When you have parentheses inside brackets and braces (sometimes referred as nested parentheses), always work from the inside out. There are multiple types of brackets. The innermost parentheses/round brackets () are calculated first, followed by the brackets/box brackets [] that normally form the next layer, followed by braces/curly brackets {} that form a third layer outwards: