Order of Operations (BODMAS / PEMDAS) Explained With Examples

Two friends type the same sum, 2 + 3 × 4, into two different calculators. One shows 14, the other shows 20. Both are sure the other device is broken. Neither is, exactly: they follow different rules about which step comes first, and only one of those rules is the one mathematics uses.

This article explains the order of operations in plain terms, why the answer is 14, where people go wrong (negative numbers, division chains, powers), and how to check your own working in a few seconds.

Solving any expression in three steps: brackets first, powers then multiply and divide, then add and subtract
Solving any expression in three steps: brackets first, powers then multiply and divide, then add and subtract

The rule in one paragraph

Work in this order: brackets first, then powers (exponents), then multiplication and division together, then addition and subtraction together. In the UK and many other countries this is taught as BODMAS or BIDMAS, in the US as PEMDAS, and in Canada and New Zealand often as BEDMAS. The names differ and the rule is the same, as this explainer on BODMAS, BIDMAS and PEMDAS sets out.

The detail people miss is in the words “together”. Multiplication and division share one level, and addition and subtraction share the level below. Inside a level you go from left to right. The letters in the acronym suggest that D comes before M, or that A comes before S, and that is the source of most mistakes.

Why 2 + 3 × 4 is 14

Multiplication ranks above addition, so you do 3 × 4 = 12 first and then add 2. The answer is 14. If you want the addition to happen first, you must say so with brackets: (2 + 3) × 4 = 20. Brackets are not decoration. They are the only way to override the normal order.

Why does a calculator ever give 20? Some basic calculators work through your keystrokes one at a time, so they add 2 and 3 as soon as you press the next operator, then multiply by 4. A scientific calculator, or one that shows the whole expression, applies the rule. If your phone shows 20, you are probably using a chain-style calculator, so enter the sum in a scientific mode or add the brackets yourself.

Worked examples, from easy to tricky

ExpressionStepsAnswer
10 − 2 × 32 × 3 = 6, then 10 − 64
(10 − 2) × 310 − 2 = 8, then 8 × 324
8 ÷ 2 × 4left to right: 8 ÷ 2 = 4, then 4 × 416
20 − 5 + 3left to right: 20 − 5 = 15, then 15 + 318
5 + 2² × 32² = 4, then 4 × 3 = 12, then 5 + 1217
3 + (6 − 2)² ÷ 46 − 2 = 4, 4² = 16, 16 ÷ 4 = 4, then 3 + 47

Look at the third and fourth rows. If you did the multiplication before the division in 8 ÷ 2 × 4, you would get 8 ÷ 8 = 1, which is wrong. If you did the addition before the subtraction in 20 − 5 + 3, you would get 20 − 8 = 12, also wrong. Same-level operations go left to right, always.

A shopping example in riyals

Here the order of operations changes real money. An item costs 120 SAR and there is a 20 SAR discount, then 15% VAT is added. The correct sum is (120 − 20) × 1.15 = 115 SAR. Now suppose you type 120 − 20 × 1.15 with no brackets. The calculator does 20 × 1.15 = 23 first, then 120 − 23 = 97 SAR. That is an 18 SAR difference, caused by two missing brackets. The figures are a made-up example, but the mistake is very common when people build formulas in a phone or a spreadsheet. For quick discount and VAT sums you can also use the percentage calculator, which handles the brackets for you.

This is general information, not financial advice. For discounts and tax on a real invoice, check the amounts against the seller’s receipt.

Where people go wrong

Negative numbers and powers

Is −3² equal to 9 or −9? The power applies only to the 3, so 3² = 9 and the minus sign comes after: the answer is −9. To square a negative number you need brackets: (−3)² = 9. Our online calculator follows this rule and shows −9 for −3^2.

Stacked powers

For 2^3^2, powers are worked from the top down, which means right to left: 3² = 9, then 2⁹ = 512. If you did it left to right you would get 8² = 64. This is one of the few cases where the direction flips, and the same calculator returns 512.

Division written as a fraction bar

In a fraction such as (4 + 8) over 3, the bar acts like brackets around the top and the bottom. When you type it on one line you must add them yourself: (4 + 8) ÷ 3 = 4, not 4 + 8 ÷ 3 = 6.67.

Implicit multiplication

Expressions like 8 ÷ 2(2 + 2) go viral because people disagree on whether the multiplication next to the bracket binds tighter than a division. Textbooks and calculators are not consistent about it. When you write maths for others, remove the doubt: write 8 ÷ (2 × (2 + 2)) or (8 ÷ 2) × (2 + 2), whichever you mean.

A memory aid that does not mislead

Acronyms are fine for the first read, but they hide the tie rule. A better picture is a staircase with four steps. The top step is brackets, the second is powers, the third holds multiplication and division side by side, and the bottom holds addition and subtraction side by side. You always handle the highest step that still has something on it. When two operations share a step, the one further left goes first.

Try it on 18 − 6 ÷ 3 × 2 + 1. Division and multiplication share the third step, so 6 ÷ 3 = 2, then 2 × 2 = 4. Now the bottom step: 18 − 4 + 1 = 15. Doing the sum in the wrong order can produce 9 or 18, so it is a good one to test yourself on before an exam.

How to check your work quickly

  1. Underline the brackets and solve inside them first, starting with the innermost pair.
  2. Deal with powers and roots next.
  3. Scan from left to right and do every multiplication and division as you meet it.
  4. Scan again from left to right for addition and subtraction.
  5. Type the same expression into a scientific calculator that applies the order of operations and compare. Press the equals key to see the result and tap a line in the history to reuse it.

If your answers differ, the calculator shows the whole expression, so compare it with what you wrote and look for a missing bracket first.

When this rule does not decide the answer

The order of operations settles how to read a written expression. It does not tell you what the question means. In a word problem, ask what is being combined before you write the sum. And some computer languages and spreadsheets differ from school maths in small details, for example in how they treat a negative sign before a power, so check the documentation before trusting a formula you did not write.

For related reading, see how to calculate a percentage increase and decrease, where the brackets matter, and our guide to calculating cumulative GPA, which is a good practice ground for multiplying before adding.

Frequently asked questions

Is BODMAS different from PEMDAS?

No. They are the same rule with different names. B and P both stand for brackets (parentheses), and O and E both stand for powers (orders or exponents).

Do you always multiply before dividing?

No. Multiplication and division have equal rank, so you work through them from left to right. In 8 ÷ 2 × 4 the answer is 16.

Why does my phone calculator give a different answer?

Some basic calculators perform each operation as you press it instead of reading the whole expression. Use a scientific calculator or add brackets.

Does the order change if the numbers are negative?

The order stays the same, but the minus sign needs care. A power applies before a leading minus, so −3² is −9 and (−3)² is 9.

Try the tool free: Type any expression and see the answer as you type, with brackets, powers and a scientific mode.Open the Online Calculator
Scroll to Top