How the Order of Operations Works
The order of operations is the set of rules that tells you which parts of an expression to evaluate first. Without it, the same expression could produce different answers depending on who is calculating. With it, every person and every calculator reaches the same result.
It is usually remembered as PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction) or BODMAS (Brackets, Orders, Division, Multiplication, Addition, Subtraction). Both describe the same hierarchy — only the names differ.
Open the matching Basic Math Solver
PEMDAS: Parentheses → Exponents → Multiplication & Division (left to right) → Addition & Subtraction (left to right)
The four levels of priority
Work through Parentheses (or brackets) first — anything inside them is treated as a single value and evaluated before it interacts with anything outside. Nested parentheses are resolved from the innermost outward.
Next come Exponents and roots (also called "orders" or "indices"). This includes powers like 2³ and roots like √16. A root behaves like a fractional exponent, so it sits on the same level.
Then Multiplication and Division share a level and are handled from left to right. Neither comes before the other in general — you simply process whichever appears first as you read the expression.
Finally Addition and Subtraction share the lowest level and are also handled from left to right. Again, neither has priority; you take them in the order they appear.
Why "left to right" matters
A common myth is that multiplication always comes before division. It does not. In 12 ÷ 3 × 2, you divide first (12 ÷ 3 = 4) then multiply (4 × 2 = 8). Reading left to right gives 8; doing multiplication first would wrongly give 12 ÷ 6 = 2.
The same applies to addition and subtraction. In 10 − 3 + 2, subtract first (10 − 3 = 7) then add (7 + 2 = 9). Treating addition as higher priority would give 10 − 5 = 5, which is wrong.
Percentages and roots inside expressions
Percentages are read as decimals: 20% of 350 means 0.2 × 350 = 70. When a percentage appears inside a larger expression, it is converted to its decimal form and then follows the normal order of operations.
Roots such as √16 are treated like exponents, so 5 + √16 = 5 + 4 = 9. The Basic Math Solver applies these rules automatically and prints the order in which it collapses the expression, so you can check each stage against your own working.
How to check a result without a second calculator
Estimate first. Round each number to something you can do in your head, keep the same order, and see whether the exact answer is in the same neighbourhood. For 19.8 × 4.1 + 6, a rough check is 20 × 4 + 6 = 86. An answer of 8.6 or 860 is a decimal-place error, not a close call.
A second check is to move one pair of parentheses and recompute. (12 + 8) × 3 and 12 + 8 × 3 must differ: 60 versus 36. If your method gives the same number for both, it is not actually applying the order of operations.
Negative numbers and the unary minus
A minus sign can mean subtraction (between two values) or negation (in front of a single value). The unary minus applies to the value immediately following it, so −3² is read as −(3²) = −9, while (−3)² = 9. The parentheses decide whether the negative sign is inside the squaring.
When a negative number multiplies a bracket, the sign travels with it. −2(4 + 1) means −2 × 5 = −10. Writing the multiplication explicitly as −2 × (4 + 1) removes any doubt about whether the minus belongs to the 2 or to the whole product.
Worked example
Evaluate 12 + 8 × 3 − (6 ÷ 2)
- 1Parentheses first: 6 ÷ 2 = 3, so the expression becomes 12 + 8 × 3 − 3.
- 2No exponents, so move to multiplication and division left to right: 8 × 3 = 24, giving 12 + 24 − 3.
- 3Addition and subtraction left to right: 12 + 24 = 36, then 36 − 3 = 33.
Answer: 33
Another worked example
Evaluate 4 + 18 ÷ 3² × 2
- 1Exponents before division: 3² = 9, so the expression is 4 + 18 ÷ 9 × 2.
- 2Multiplication and division share a level and run left to right: 18 ÷ 9 = 2, then 2 × 2 = 4.
- 3Addition last: 4 + 4 = 8.
- 4Doing multiplication before the division to its left would compute 9 × 2 = 18, then 18 ÷ 18 = 1, then 4 + 1 = 5. That wrong answer is the symptom of breaking the left-to-right rule.
Answer: 8
Another worked example
Evaluate −3² + 2 × (5 − 8)
- 1Parentheses first: 5 − 8 = −3, giving −3² + 2 × (−3).
- 2Exponents: 3² = 9. The minus is unary and outside the square, so −3² = −9. The expression is −9 + 2 × (−3).
- 3Multiplication: 2 × (−3) = −6, giving −9 + (−6).
- 4Addition: −9 + (−6) = −15.
- 5Contrast: had it been (−3)², the square would apply to −3 and give 9, changing the final answer to 3.
Answer: −15
How to read the result
A correct result is a single number that every careful reader should be able to reproduce. If two people disagree, one of them almost always skipped a grouping symbol, treated “of” as addition, or did multiplication before a division that sits to its left.
Read the solver’s intermediate lines as a collapse, not as a new problem. Each line should contain fewer operations than the one above it. If a line introduces a number you cannot find in the original expression, recheck that step before trusting the final value.
Limits of this method
This method evaluates a fully numeric expression. It does not solve for an unknown. If the expression contains a letter, or an equals sign you are trying to balance, use the Linear Equation Solver or the Quadratic Equation Solver.
Implied multiplication beside a function, such as 2sin(30), is easy to misread. Write the multiplication explicitly and close every parenthesis. Unsupported characters are rejected rather than guessed.
Common mistakes
- Doing addition before multiplication — 12 + 8 × 3 is 36, not 60. Always handle multiplication and division before addition and subtraction.
- Forgetting that multiplication and division share a level — process them left to right, not "multiplication first".
- Ignoring parentheses — (12 + 8) × 3 is 60, not 36. Brackets override the default order.
- Misreading a root as multiplication — √16 is 4, not 16 × something.
Frequently asked questions
Is PEMDAS the same as BODMAS?
Yes. PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction) and BODMAS (Brackets, Orders, Division, Multiplication, Addition, Subtraction) describe the same hierarchy with different names.
Does multiplication always come before division?
No. Multiplication and division share the same priority and are evaluated left to right. The same is true for addition and subtraction.
What does "of" mean in percentage problems?
"Of" means multiply. 20% of 350 is 0.2 × 350 = 70. The percentage is converted to a decimal first, then multiplied.
Where does a square root sit in the order?
A root is an exponent in disguise, since √x = x^(1/2). It is evaluated with exponents, after parentheses and before multiplication and division.
Is −3² the same as (−3)²?
No. −3² means −(3²) = −9, because the exponent binds before the unary minus. (−3)² squares the whole −3, giving 9. Parentheses around the negative number change the result.
Does a fraction bar act like parentheses?
Yes. The bar groups the whole numerator and the whole denominator. Evaluate each fully, then divide. (12 + 6) / 3 is 6, not 12 + 2.