Numbers & Arithmetic

Order of Operations (PEMDAS)

The order of operations is: grouping symbols first, then exponents, then multiplication and division together from left to right, then addition and subtraction together from left to right. In symbols, P→E→(MD)→(AS)P \to E \to (MD) \to (AS).

P→E→(M D)→(A S)P \rightarrow E \rightarrow (M\,D) \rightarrow (A\,S)

Try it with your numbers

Show every step

PEMDAS looks like six steps, but it is really four steps, and nearly every lost point comes from reading it as six. The sections below explain why the rules exist, how they behave with negatives, fractions, roots and nested brackets, and how to check an answer before you trust it.

What Is the Order of Operations (PEMDAS) and Why Does It Exist?

An expression needs exactly one reading. Without an agreed priority, 3+4⋅53 + 4 \cdot 5 could mean 7⋅5=357 \cdot 5 = 35 or 3+20=233 + 20 = 23. The convention picks 23, and the choice has a reason behind it. Multiplication is shorthand for repeated addition, so 4⋅54 \cdot 5 is a packaged 5+5+5+55 + 5 + 5 + 5, and a package is evaluated as one chunk before it joins anything else. Exponents are shorthand for repeated multiplication, so they sit one level tighter still.

Ranking from tightest to loosest gives the four steps:

  1. Grouping symbols, which override everything outside them
  2. Exponents (and roots)
  3. Multiplication and division, equal rank, left to right
  4. Addition and subtraction, equal rank, left to right

Parentheses let you ask for a weaker operation first: (3+4)⋅5=35(3 + 4)\cdot 5 = 35. This is the distributive idea in disguise, since (3+4)⋅5=3⋅5+4⋅5=35(3+4)\cdot 5 = 3\cdot 5 + 4\cdot 5 = 35, which is explained in Commutative, Associative and Distributive Properties. The same ranking is why algebra writes 3+4x3 + 4x with no brackets: 4x4x is a product, and products form before sums.

Quick check

2+3⋅422 + 3\cdot 4^2

Does Multiplication Come Before Division in PEMDAS?

Left to right gives 16 while multiplying first gives 4 for 48 divided by 6 times 2
Working left to right gives 48 ÷ 6 × 2 = 16, while multiplying first wrongly gives 4.

No. The letters M then D suggest that multiplication wins, but the two share one rank and are processed in the order they appear. Take 48÷6⋅248 \div 6 \cdot 2. Left to right, 48÷6=848 \div 6 = 8, then 8⋅2=168 \cdot 2 = 16. Multiplying first would give 48÷12=448 \div 12 = 4, which is wrong.

Addition and subtraction behave the same way: 10−4+3=6+3=910 - 4 + 3 = 6 + 3 = 9, not 10−7=310 - 7 = 3. Subtraction is adding a negative, so 10−4+310 - 4 + 3 is 10+(−4)+310 + (-4) + 3, and the minus sign belongs to the 4. Subtracting Integers shows how that sign travels through longer expressions.

Division only grabs the next number

a÷b⋅ca \div b \cdot c means ab⋅c\frac{a}{b}\cdot c, not abc\frac{a}{bc}. Division is multiplication by a reciprocal, which is the idea behind Dividing Fractions.

The fastest reliable method is to split the expression into terms. Terms are the pieces separated by ++ and −- signs that sit outside any brackets. Each term can be simplified on its own, and only then do you combine them. For 20−12÷3⋅2+520 - 12 \div 3 \cdot 2 + 5 the terms are 2020, 12÷3⋅212 \div 3 \cdot 2 and 55.

12÷3⋅2=4⋅2=812 \div 3 \cdot 2 = 4 \cdot 2 = 8

20−8+5=12+5=1720 - 8 + 5 = 12 + 5 = 17

PEMDAS vs BODMAS: Is It the Same Order of Operations?

It is the same rule with different labels. The mnemonic changes by country, but the structure never does.

Name Where used First two steps
PEMDAS United States Parentheses, Exponents
BODMAS UK, India and others Brackets, Orders
BEDMAS Canada Brackets, Exponents
GEMDAS Some US classrooms Grouping, Exponents

BODMAS puts D before M and PEMDAS puts M before D. That changes nothing, because the two are one step. Read every version as grouping, powers, then MD, then AS.

The word “parentheses” is narrower than the idea behind it. Grouping includes square brackets and braces, fraction bars, radical signs, function inputs such as sin⁡(x+1)\sin(x + 1), and absolute value bars. For instance, ∣3−8∣|3 - 8| means simplify inside first, giving ∣−5∣=5|-5| = 5, and only then does the bar act.

Order of Operations With Negative Numbers and Exponents

The classic trap is −32-3^2. The exponent attaches to the 3 alone, because a leading minus sign behaves like multiplying by −1-1, which is a later step. So −32=−(32)=−9-3^2 = -(3^2) = -9, while (−3)2=9(-3)^2 = 9. Excel and some other spreadsheets read a leading minus differently and return 9 for a typed −32-3^2, so type the brackets you mean.

Try this: Without a calculator, evaluate −24-2^4, (−2)4(-2)^4 and −(−2)4-(-2)^4. Then say in one sentence why two of them match.

Signs inside a longer expression follow the usual product rules, covered in Multiplying Integers. Here is a full example.

5−3⋅(−2)2+6÷(−3)5 - 3\cdot(-2)^2 + 6 \div (-3)

Exponent first, because the bracket already holds −2-2: (−2)2=4(-2)^2 = 4.

5−3⋅4+6÷(−3)5 - 3\cdot 4 + 6 \div (-3)

Multiplication and division, left to right: 3⋅4=123 \cdot 4 = 12 and 6÷(−3)=−26 \div (-3) = -2.

5−12+(−2)5 - 12 + (-2)

Addition and subtraction, left to right: 5−12=−75 - 12 = -7, then −7+(−2)=−9-7 + (-2) = -9. The answer is −9-9.

Quick check

−62÷4-6^2 \div 4

Order of Operations With Fractions and Fraction Bars

Fraction bar groups top and bottom giving 4 while typing it flat gives 4.25
The bar groups the whole top and bottom, so (3 + 9) ÷ (2² − 1) = 4, but typed flat it becomes 4.25.

A fraction bar is a grouping symbol in disguise. It puts invisible parentheses around the entire top and the entire bottom, so each is simplified fully before the division happens. In 3+922−1\dfrac{3 + 9}{2^2 - 1}, the top is 1212 and the bottom is 4−1=34 - 1 = 3, so the value is 12÷3=412 \div 3 = 4.

This is where typed expressions fail. Entering 3+9/2^2-1 on a calculator gives 3+94−1=4.253 + \frac{9}{4} - 1 = 4.25, because nothing told the machine to group the top and bottom. Entering (3+9)/(2^2-1) gives 4.

Fractions inside a longer line follow the same ranking. Consider 12+34⋅23\frac12 + \frac34 \cdot \frac23. Multiplication comes first: 34⋅23=612=12\frac34\cdot\frac23 = \frac{6}{12} = \frac12. Then 12+12=1\frac12 + \frac12 = 1. Only when a sum of fractions has different denominators do you need a common denominator, as in Adding Fractions with Unlike Denominators. When fraction bars are stacked inside each other, simplify the top and bottom first, as shown in Simplifying Complex Fractions.

How Do Nested Brackets, Roots and Factorials Fit In?

With nested brackets, work from the innermost pair outward. Take 2[3+(4−1)2]−52[3 + (4 - 1)^2] - 5.

2[3+32]−52[3 + 3^2] - 5

2[3+9]−5=2⋅12−5=24−5=192[3 + 9] - 5 = 2 \cdot 12 - 5 = 24 - 5 = 19

Stacked exponents are the one place where the direction flips. A tower is evaluated from the top down, so 232=29=5122^{3^2} = 2^9 = 512, not (23)2=64(2^3)^2 = 64. Reading a tower left to right is a common error.

A radical sign groups what is under it, so 9+16=25=5\sqrt{9 + 16} = \sqrt{25} = 5, while 9+16=7\sqrt{9} + \sqrt{16} = 7. The two are different expressions, and Square Roots explains why a root cannot be split across a sum. A factorial binds tighter than multiplication, so 2⋅3!=2⋅6=122 \cdot 3! = 2 \cdot 6 = 12, whereas (2⋅3)!=720(2\cdot 3)! = 720.

Why Does Implicit Multiplication Cause Arguments Online?

The viral expression 8÷2(2+2)8 \div 2(2+2) splits people because two reasonable conventions collide. Under strict left to right, 8÷2=48 \div 2 = 4 and then 4⋅4=164 \cdot 4 = 16. Others treat 2(2+2)2(2+2) as one glued unit, giving 8÷8=18 \div 8 = 1. Some calculator models follow the second habit and others the first, so the same keystrokes can disagree.

This is a notation problem, not a gap in arithmetic. The standard rule gives 16, but a writer who meant 1 should have written 82(2+2)\dfrac{8}{2(2+2)} or 8÷(2(2+2))8 \div (2(2+2)). Professional writing avoids the question entirely by never leaving a division ahead of a juxtaposed product.

Write what you mean

If a division should cover several factors, group them: 8÷(2⋅4)=18 \div (2 \cdot 4) = 1. If it should cover only the next number, leave it plain: 8÷2⋅4=168 \div 2 \cdot 4 = 16.

Where Is the Order of Operations Used in Real Life?

Every formula you plug numbers into depends on it. Temperature conversion is the cleanest example: C=59(F−32)C = \frac{5}{9}(F - 32). For 77∘F77^\circ\text{F}, the bracket comes first: 77−32=4577 - 32 = 45, then 59⋅45=25\frac59 \cdot 45 = 25, so it is 25∘C25^\circ\text{C}. Skipping the brackets gives 59⋅77−32≈10.78\frac59\cdot 77 - 32 \approx 10.78, which is wrong. The full formula is on the Fahrenheit to Celsius Formula page.

Compound interest uses the exponent step. With A=P(1+r)tA = P(1 + r)^t, a deposit of 10001000 at 5%5\% for 2 years gives 1000⋅(1.05)2=1000⋅1.1025=1102.501000 \cdot (1.05)^2 = 1000 \cdot 1.1025 = 1102.50. Squaring the product instead, (1000⋅1.05)2(1000 \cdot 1.05)^2, would claim 1,102,5001{,}102{,}500.

Percent change has the same shape: 50−4040⋅100\dfrac{50 - 40}{40}\cdot 100 needs the subtraction on top finished before dividing, giving 0.25⋅100=25%0.25 \cdot 100 = 25\%. Spreadsheets and programming languages follow the same precedence, which is why their formulas are full of brackets.

Quick check

Convert 59∘F59^\circ\text{F} to Celsius with C=59(F−32)C = \frac{5}{9}(F - 32).

How Do You Check an Order of Operations Answer?

Checking is quicker than redoing, and these habits catch most errors:

  1. Add the hidden brackets. Rewrite 3+4⋅523 + 4\cdot 5^2 as 3+(4⋅(52))3 + (4 \cdot (5^2)) to see the exact order the rules demand.
  2. Simplify one level per line and copy everything else unchanged. Skipped lines are where signs go missing.
  3. Estimate with round numbers first. If 19.8÷4.1+2.9⋅3.219.8 \div 4.1 + 2.9 \cdot 3.2 is about 5+9=145 + 9 = 14, an answer of 140 is a slip.
  4. Compare the sign of your final answer with the sign of the largest term.

After this, test yourself with the Order of Operations Practice Problems, and for every miss, find which of the four steps you reordered.

Practice problems

0 of 5 solved

  1. 6+4⋅56 + 4 \cdot 5

  2. 36÷4⋅3−236 \div 4 \cdot 3 - 2

  3. 3−2⋅(5−8)23 - 2\cdot(5 - 8)^2

  4. 52−13⋅2−2\dfrac{5^2 - 1}{3\cdot 2 - 2}

  5. −22+3⋅(−4+7)2÷9−6÷(−2)-2^2 + 3\cdot(-4 + 7)^2 \div 9 - 6 \div (-2)

Common questions

What does PEMDAS stand for?

Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. The common phrase is Please Excuse My Dear Aunt Sally. Multiplication and division share one step, and so do addition and subtraction.

Do you multiply or divide first in order of operations?

Neither has priority. Multiplication and division have equal rank, so you do whichever comes first when reading left to right. For example, 24÷6⋅2=4⋅2=824 \div 6 \cdot 2 = 4 \cdot 2 = 8.

Is −32-3^2 equal to 9 or -9?

It equals −9-9. The exponent applies only to the 3, and the minus sign is applied afterwards. To square the negative number, write (−3)2=9(-3)^2 = 9.

Is PEMDAS the same as BODMAS?

Yes. BODMAS (used in the UK and elsewhere), BEDMAS (Canada) and GEMDAS describe the same rule with different words for the first two steps. The order of the letters M and D, or A and S, never changes the result.

Do addition and subtraction go left to right?

Yes. They share one rank, so 10−4+3=6+3=910 - 4 + 3 = 6 + 3 = 9. Adding first would give 10−7=310 - 7 = 3, which is wrong.

Why do calculators give different answers to the same expression?

Most follow the standard precedence, but some treat implicit multiplication such as 2(3)2(3) as binding tighter than division. Typing explicit parentheses or using a fraction bar removes the doubt.

Up next