The rule behind every arithmetic step
Order of Operations
The order of operations is the agreed-upon sequence for evaluating a math expression that mixes several operations, so that everyone gets the same answer from the same expression. It is the rule behind every arithmetic step the math solver on the homepage shows: parentheses first, then exponents, then multiplication and division, then addition and subtraction.
The rule, in order
Most English-speaking countries teach this as PEMDAS (Parentheses, Exponents, Multiplication and Division, Addition and Subtraction); many other countries teach the identical rule as BODMAS or BIDMAS (Brackets, Orders, Division and Multiplication, Addition and Subtraction). Both acronyms describe exactly the same four-level priority order, just with different local names for the same categories.
- Parentheses / Brackets: evaluate anything inside ( ) first, working from the innermost pair outward if they are nested.
- Exponents / Orders: evaluate powers and roots next, such as squaring a number or taking a square root.
- Multiplication and Division: evaluate these together, working strictly left to right (multiplication is not always done before division; whichever comes first, left to right, goes first).
- Addition and Subtraction: evaluate these last, also together and left to right (addition is not always done before subtraction).
A common misconception
The acronym PEMDAS makes it look like multiplication always happens before division, and addition always happens before subtraction, because that is the order the letters are written in. That is not quite right. Multiplication and division are actually the same priority level and are evaluated left to right in whichever order they appear; the same is true for addition and subtraction. For example, in 20 / 4 * 2, division is written first, so it happens first: 20 / 4 = 5, then 5 * 2 = 10. Evaluating the multiplication first instead would give the wrong answer, 20 / (4 * 2) = 2.5, which is not what the expression, as written without parentheses, actually means.
Worked example: mixing all four levels
Take 2 + 3 * (4 - 1)^2, the same example used on the examples page. Working through the four levels in order: the parentheses resolve first (4 - 1 = 3), then the exponent (3^2 = 9), then the multiplication (3 * 9 = 27), and finally the addition (2 + 27 = 29). Each level is fully resolved before moving to the next; you never jump ahead to addition while an exponent is still unresolved elsewhere in the expression.
Why the rule exists at all
Without an agreed order, an expression like 2 + 3 * 4 would be ambiguous: read left to right with no priority rules it could mean (2 + 3) * 4 = 20, or it could mean 2 + (3 * 4) = 14, and there would be no way to tell which was intended just by looking at it. The order of operations exists specifically to remove that ambiguity, so that any two people (or a person and a calculator, or two different calculators) reading the same expression always get the same answer. It is a notational convention, agreed on for consistency, not a mathematical law that could be 'discovered' to be different.
Nested parentheses
When parentheses are nested inside other parentheses, work from the innermost pair outward. For 2 * (1 + (3 * 4)), the innermost operation is 3 * 4 = 12, which turns the expression into 2 * (1 + 12), and then 1 + 12 = 13, giving 2 * 13 = 26. The math solver handles nested parentheses of any depth the same way, always resolving the deepest available parentheses first, which is exactly this left-to-right, innermost-first process, just automated.
How this connects to solving equations
Order of operations is not just for plain arithmetic, it is also what makes expanding and simplifying the left and right sides of an equation well-defined before you start moving terms around. When the solver expands something like 3*(x + 2) - 2*x as part of solving a linear equation (see the worked examples with distributed terms), it is relying on the same underlying rule: the multiplication distributes across the parentheses before the subtraction of the 2*x term is applied. Getting that order right is what separates a correct simplification from a common hand-solving mistake.
Negative numbers and order of operations
Negative signs add a wrinkle worth calling out on their own. In -3^2, the exponent applies to the 3 alone, not to the negative sign, so the result is -9, not 9 (that convention treats the leading minus as a separate subtraction/negation applied after the exponent). To square a negative three and get a positive result, the negative sign needs its own parentheses: (-3)^2 = 9. This single-character difference between -3^2 and (-3)^2 is one of the most common sources of a wrong sign in an otherwise correct calculation, and it is exactly the kind of subtlety that a step-by-step breakdown makes visible instead of hiding inside a single jumped-to answer.
Common order-of-operations mistakes
A short list of the mistakes that come up most often, worth checking against whenever an answer looks surprising:
- Adding or subtracting before a multiplication or division elsewhere in the same expression, simply because it appears first when reading left to right.
- Assuming multiplication always beats division (or addition always beats subtraction) instead of treating each pair as equal priority, evaluated left to right.
- Forgetting that a negative sign directly in front of a number is not automatically included inside an exponent unless it has its own parentheses.
- Resolving an outer set of parentheses before finishing everything inside a nested, inner set.
- Skipping a step mentally and combining two operations at once, which is where most simple arithmetic slips happen even when the order itself was understood correctly.
Quick reference table
| Priority | Operation | Example |
|---|---|---|
| 1 (highest) | Parentheses / Brackets | (2 + 3) evaluated before anything outside it |
| 2 | Exponents / Roots | 2^3 evaluated before addition or multiplication around it |
| 3 | Multiplication and Division | Left to right: 20 / 4 * 2 = 10, not 2.5 |
| 4 (lowest) | Addition and Subtraction | Left to right: 10 - 4 + 2 = 8, not 4 |
Frequently asked questions
Can I practice this rule with my own numbers?
Is PEMDAS the same as BODMAS?
Does multiplication always come before division?
What about addition and subtraction?
How does the math solver apply this rule?
Practice with the solver
Type any expression and watch it apply this exact order.
Open the math solverKostenlos. Keine Anmeldung.