Pre-Algebra Foundations

Order of Operations Explained Beyond PEMDAS

Understand the order of operations as four levels of grouping, handle negative signs and fraction bars, and avoid the usual PEMDAS traps.

Key takeaways

  • There are four levels: grouping, exponents, multiplication with division, and addition with subtraction.
  • Multiplication and division share one level, as do addition and subtraction, and each level is read left to right.
  • Fraction bars, root signs and absolute value bars group whatever they cover, even without parentheses.
  • A leading minus sign in -4² applies after the power, so the value is -16.
  • When an expression could be read two ways, add parentheses instead of relying on a convention.

The order of operations is an agreement about how to read a written expression: work inside grouping symbols first, then powers, then multiplication and division from left to right, then addition and subtraction from left to right. It exists so that everyone who sees 2 + 3 × 4 gets 14.

The familiar letters PEMDAS are a rough label for this agreement. Taken too literally, they lead to wrong answers, so it helps to understand the structure behind them.

The four levels

Level Operations Direction when several appear
1 Grouping symbols innermost first
2 Exponents and roots see the note on stacked powers
3 Multiplication and division left to right
4 Addition and subtraction left to right

An example that uses all four:

30 - 2 × (7 - 4)² ÷ 6
= 30 - 2 × 3² ÷ 6        (grouping)
= 30 - 2 × 9 ÷ 6         (power)
= 30 - 18 ÷ 6            (multiply, being leftmost)
= 30 - 3                 (divide)
= 27                     (subtract)

Writing one change per line keeps the unchanged parts from getting lost.

What the acronym leaves out

PEMDAS stands for parentheses, exponents, multiplication, division, addition and subtraction. It is a handy prompt, but several things are missing from it.

It names only parentheses, although brackets, braces, fraction bars and root bars group just as firmly. It does not mention negative signs at all. And its six letters suggest six ranks when there are four.

It also hides the meaning of "parentheses first." That phrase means to finish what is inside a group before using its value, following all the levels again inside. It does not mean that anything written next to a parenthesis gets special priority. In 3 + 2(5 - 1)², you compute 5 - 1 = 4 inside, then square to get 16, then multiply by 2 to get 32, then add 3 for 35.

Parentheses used only to show multiplication, as in 2(7), contain nothing to simplify. So in 2(7)², the exponent applies to 7 alone and the value is 2 × 49 = 98.

Nested groups are worked from the inside outward:

2[20 - 3(8 - 6)²]
= 2[20 - 3(2)²]
= 2[20 - 12]
= 16

Why multiplication comes before addition

The agreement is a convention, but a sensible one. Multiplication by a whole number is repeated addition, so 2 + 3 × 4 reads naturally as 2 plus three fours.

It also makes algebra compact. A polynomial such as 5x² + 3x + 7 can be written with no parentheses at all, because the powers bind tightest, then the products, and the sum is assembled last. A different convention would force brackets around nearly every term.

You can think of an expression as a sum of terms. Find the plus and minus signs that are not inside any grouping. They cut the expression into pieces. Evaluate each piece, then add.

4 × 5 - 18 ÷ 3² + 7
  [4 × 5]  - [18 ÷ 3²] + [7]
=   20     -     2     +  7
=   25

The left to right rule

PEMDAS lists M before D and A before S, which suggests an order that does not exist. Multiplication and division are partners of equal rank. So are addition and subtraction.

24 ÷ 4 × 3 = 6 × 3 = 18          not 24 ÷ 12 = 2
10 - 4 + 3 = 6 + 3 = 9           not 10 - 7 = 3

The reason is that division is multiplication by a reciprocal, and subtraction is addition of an opposite. Rewritten that way, 24 × (1/4) × 3 can be computed in any grouping, and 10 + (-4) + 3 can be added in any order. The left to right rule protects you when the operations are written with ÷ and -.

Levels of binding, tightest on top
Grouping Parentheses, brackets, fraction bars, roots Exponents A power binds to its base only Multiply and divide Equal rank, read left to right Add and subtract Equal rank, read left to right Grouping Parentheses, brackets, fraction bars, roots Exponents A power binds to its base only Multiply and divide Equal rank, read left to right Add and subtract Equal rank, read left to right

Grouping that does not look like grouping

Several symbols act as parentheses without being drawn that way.

  • A fraction bar groups the entire top and the entire bottom: in (8 + 4) over (5 - 1), the value is 12/4 = 3.
  • A root sign with a bar groups what is under the bar: the root of 9 + 16 is √25 = 5.
  • Absolute value bars group their contents: |3 - 10| = 7.
  • A raised exponent groups itself: in 2 to the power 3 + 1, written with both raised, the exponent is 4.

When you retype these on one line, you must supply the parentheses: (8 + 4)/(5 - 1) and √(9 + 16). Typing 8 + 4/5 - 1 produces 7.8. This is covered in detail in hidden parentheses in fraction bars.

Exponents and negative signs

An exponent applies only to what sits immediately before it.

3 × 2² = 3 × 4 = 12
(3 × 2)² = 6² = 36
-4² = -(4²) = -16
(-4)² = 16

In ordinary algebraic notation, a leading minus sign is applied after the power. This matches how polynomials are read: in -x² + 9 with x = 4, the value is -16 + 9 = -7. Some spreadsheet programs apply the minus sign first, so test yours before trusting it. See why -3² and (-3)² differ.

Stacked powers are read from the top down: 2 raised to 3² means 2⁹ = 512, while (2³)² = 8² = 64.

What the order does not require

The order of operations tells you how to interpret an expression. It does not force one sequence of arithmetic. The properties of numbers allow other routes that give the same value.

In 25 × 37 × 4, you may reorder and compute 25 × 4 = 100 first, getting 3,700. That is the commutative property together with grouping.

In 7 × (100 + 3), you may add first, or you may distribute to get 700 + 21. Both give 721, thanks to the distributive property. With variables, as in 7(x + 3), adding first is impossible, and distributing is the only way to remove the parentheses.

Independent groups can also be evaluated in either order. In (6 + 1) × (9 - 4), it does not matter which parenthesis you do first.

Reading expressions with letters

The same levels govern algebraic expressions, and they tell you which terms you may combine. In 4 + 3x, the product 3x is formed before the 4 is added, so the expression cannot be rewritten as 7x. Test x = 2: 4 + 3(2) = 10, while 7(2) = 14.

In 5x², only x is squared, so at x = 3 the value is 45. In (5x)² the value is 225.

In 10 - 2(x + 1), the multiplication by 2 belongs to the parenthesis, and the subtraction happens afterward. Distributing -2 gives 10 - 2x - 2 = 8 - 2x. Subtracting first, to get 8(x + 1), breaks the order. At x = 4 the original is 10 - 10 = 0 and 8 - 2(4) = 0, while 8(5) = 40.

A fraction with letters follows suit. In (x + 6)/3, the sum is formed first and the whole of it is divided, which is the same as x/3 + 2.

Where conventions run thin

Some typed expressions are genuinely unclear. The famous one is 8 ÷ 2(2 + 2). Reading ÷ and the unwritten multiplication with equal rank, left to right, gives 4 × 4 = 16. Reading 2(2 + 2) as a tightly bound unit, as many books treat 2x in 8 ÷ 2x, gives 8 ÷ 8 = 1.

Both habits exist in print and on calculators, so the expression is ambiguous by convention. The right fix is to rewrite it: (8 ÷ 2)(2 + 2) or 8 ÷ (2(2 + 2)). The topic gets a fuller look in implied multiplication.

A similar issue arises with 1/2x typed on one line. Write (1/2)x or 1/(2x) so the reader does not have to guess.

Evaluating with variables

When you substitute a value, wrap it in parentheses. Then apply the order of operations to what you have written.

Evaluate 2a² - b/(a + 1) for a = -3, b = 8.
2(-3)² - 8/((-3) + 1)
= 2(9) - 8/(-2)
= 18 - (-4)
= 22

Without parentheses, 2 × -3² would become -18, a different and incorrect value. The habit is developed in substitution without sign errors.

Writing expressions that say what you mean

The order of operations matters just as much when you build an expression. Start from a description and decide what happens last.

"Add 7 to a number, then triple the result" ends with the tripling, so the sum needs parentheses: 3(n + 7). "Triple a number, then add 7" is 3n + 7. With n = 5 the first gives 36 and the second 22.

"The square of the sum of a and b" is (a + b)². "The sum of the squares" is a² + b². For a = 3 and b = 4 these are 49 and 25.

Real calculations work the same way. Say each of 4 friends buys a $12 ticket and a $5 snack, and the group uses a single $8 coupon. The total is 4(12 + 5) - 8 = 60 dollars. Writing 4 × 12 + 5 - 8 would charge for only one snack.

Spreadsheets and programming languages follow similar rules with their own details, especially for negative signs, stacked powers and integer division. A short test with known numbers, such as typing -4^2 and seeing what comes back, tells you how a particular tool reads your input. Extra parentheses cost nothing.

Solving reverses the order

When you solve an equation, you usually peel operations off in the opposite order. In 3x² + 5 = 53, evaluating would square, multiply by 3, then add 5. Solving subtracts 5, divides by 3 and then takes square roots: 3x² = 48, x² = 16, x = 4 or x = -4. Check: 3(16) + 5 = 53.

Finding errors in worked solutions

Checking someone else's steps is good training. Here is a flawed solution.

5 + 3 × (6 - 2)² 
= 8 × (6 - 2)²       (error: added before multiplying)
= 8 × 16
= 128

The correct path is 5 + 3 × 16 = 5 + 48 = 53. The first line combined 5 and 3 even though the 3 was already bound to the power by multiplication.

A second one: 36 ÷ 6² ÷ 2 turned into 6² ÷ 2 = 18. That solver divided 36 by 6 before squaring. The power comes first, giving 36 ÷ 36 ÷ 2 = 1/2.

Practice

  1. 6 + 18 ÷ 3 × 2
  2. 40 - 4² + 2
  3. (15 - 3 × 4)³
  4. -2² × 5
  5. 100 ÷ (2 + 3)² - 1

Answers: 18; 26; 27; -20; 3.

If you missed one, name the level where your work first broke the agreement. Most errors come from doing addition before multiplication, ranking multiplication above division, or letting a minus sign slip into a power.

Written for 4Algebra with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 41 articles in Pre-Algebra Foundations →

Latest news on this topic