What is PEMDAS? Order of operations explained

PEMDAS is the order in which to work out a math expression that mixes more than one operation, so that everyone who solves it lands on the same answer. It stands for Parentheses, Exponents, Multiplication and Division, Addition and Subtraction.

The four levels

Work through an expression in this order. Within a level, go left to right.

  1. ParenthesesSolve whatever is inside brackets first, innermost pair first if they're nested.
  2. ExponentsApply powers next. In 2 × 3², the exponent touches only the 3.
  3. Multiplication and divisionEqual rank. Work through them left to right, whichever comes first.
  4. Addition and subtractionEqual rank. Again, left to right.

A worked example

Take 3 + 4 × 2. The multiplication outranks the addition, so it happens first, not the order the numbers are written in.

Step by step

= 11

3 + 4 × 2Multiply/divide, left to right
=3 + 8Add/subtract, left to right
=11

The part everyone forgets: equal ranks

PEMDAS reads like six steps in strict order, but it is really four. Multiplication and division are tied, and so are addition and subtraction. The letter order in the mnemonic is just how the sentence scans, not a ranking.

20 ÷ 4 × 5 is worked left to right: 20 ÷ 4 first, giving 25. Treating multiplication as outranking division, 4 × 5 first, gives 1 instead, which is wrong. The same goes for addition and subtraction: 10 − 4 + 3 is 9 left to right, not 3 from adding before subtracting.

PEMDAS, BODMAS, BIDMAS, BEDMAS

Different countries teach the same order with different mnemonics. The letters change; the four levels above do not.

NameMainly used in
PEMDASUnited States
BODMASUK, India, Australia and much of the Commonwealth
BIDMASalso common in the UK ("Indices" instead of "Exponents")
BEDMASCanada

Try your own expression

Type anything and get it solved with every step shown.

Common mistakes

Practice it

Questions

What does PEMDAS stand for?

Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. It is usually remembered with the sentence "Please Excuse My Dear Aunt Sally."

Is PEMDAS the same as BODMAS?

Yes. They describe the same four levels with different letters for the same things: Brackets instead of Parentheses, Orders or Indices instead of Exponents. A problem solved with PEMDAS and one solved with BODMAS always reach the same answer.

Do you always do multiplication before division?

No. Multiplication and division share a rank and are done left to right in whichever order they appear. "M before D" is a side effect of how the mnemonic is spelled, not a real rule. The same is true for addition and subtraction.

Why does order of operations exist at all?

So that one expression has exactly one answer, no matter who reads it. Without an agreed order, 3 + 4 × 2 could reasonably mean 11 or 14, and every formula, recipe scaled in a spreadsheet, or line of code would need extra brackets to stay unambiguous.