Evaluating expressions and the order of operations
Work out 4 + 3 · 7 from left to right and you get 49; multiply first and you get 25. Only one of them can be the value, so the order is agreed in advance.
The left-to-right habit gives 49
OpenStax opens its order of operations section with exactly this expression, 4 + 3 · 7, and two groups of students. The first group reads the way we read a sentence: 4 + 3 is 7, and 7 · 7 is 49. The second group multiplies first: 3 · 7 is 21, and 4 + 21 is 25. Both groups did correct arithmetic, so the disagreement is not about adding or multiplying. It is about which operation comes first. If the same expression could mean two different numbers, nobody could write a formula for anyone else to use. So mathematicians fixed one order, and the answer is 25.
The left-to-right habit is not silly. It is right for a row of additions and subtractions, and right for a row of multiplications and divisions. It goes wrong when the two kinds are mixed, because multiplication binds more tightly than addition. Think of 4 + 3 · 7 as 4 plus three sevens: the 3 · 7 is one chunk, a single amount, and the 4 is added to that chunk. Read that way, 25 stops looking like a rule to memorise and starts looking like the meaning of the expression.
The agreed order, step by step
- Parentheses and other grouping symbols, innermost first.
- Exponents.
- Multiplication and division, from left to right.
- Addition and subtraction, from left to right.
English-speaking classrooms remember the list as PEMDAS, from the silly sentence OpenStax quotes, “Please Excuse My Dear Aunt Sally”. The pairing matters more than the order of letters. “My Dear” sits together because multiplication and division have equal priority, and you do whichever comes first from the left. So 18 ÷ 9 · 2 is 2 · 2 = 4, not 18 ÷ 18 = 1. The same goes for “Aunt Sally”: 10 − 3 + 2 is 9, not 5. A longer example from the same book is 18 ÷ 6 + 4(5 − 2). The bracket gives 3, then 18 ÷ 6 is 3 and 4 · 3 is 12, and 3 + 12 = 15.
Brackets inside brackets are worked from the inside out. In 5 + 2³ + 3[6 − 3(4 − 2)], start with 4 − 2 = 2. The square bracket then holds 6 − 3 · 2 = 0, and three times zero is 0. The power 2³ is 8, so the whole thing is 5 + 8 + 0 = 13. Write each step on its own line under the one before. OpenStax recommends this habit of working down the page, and it is the easiest way to find where a mistake crept in, because each line is a complete, shorter expression with the same value as the line above.
Putting a number in place of the letter
To evaluate an expression means to find its value when the variable is replaced by a given number. You substitute, then simplify with the order of operations. For 9x − 2 with x = 5, the expression becomes 9 · 5 − 2 = 45 − 2 = 43. With x = 1 it becomes 9 − 2 = 7. Same expression, different values, because the value depends on the number you put in. Write the multiplication sign back in when you substitute. With x = 4, 3x is 3 · 4 = 12, and anyone who writes the 4 straight after the 3 sees 34, which is a different number.
Negative numbers go in with brackets. If x = −3, then x² is (−3)² = (−3) · (−3) = 9. The expression −x² is different: the power is done first and the minus sign after, so at x = −3 it is −9, and at x = 3 it is −9 as well. Brackets also protect subtraction: 5 − x at x = −2 is 5 − (−2) = 7. A spreadsheet is a handy way to evaluate one expression for many values at once, and the lab below asks you to do exactly that.
Drag to turn. Scroll or pinch to zoom.
- Simplify 4 + 3 · 7.
- Simplify (4 + 3) · 7.
- Simplify 18 ÷ 9 · 2.
- Simplify 18 ÷ 6 + 4(5 − 2).
- Simplify 5 + 2³ + 3[6 − 3(4 − 2)].
- Simplify 2³ + 3⁴ ÷ 3 − 5².
- Evaluate 9x − 2 when x = 5.
- Evaluate 3x + 7 when x = 4.
- Evaluate x² when x = −3.
- Evaluate −x² when x = 3.
- Evaluate 5 − x when x = −2.
- Which spreadsheet formula computes 9x − 2 when x is in A2?
- =9*A2-2
- =9A2-2
- =9*(A2-2)
- 9*A2-2
- “2 + 3 · 4 = 20, because you go from left to right.” Multiplication comes before addition: 3 · 4 = 12 and 2 + 12 = 14. Left to right only decides between operations of the same rank.
- “Multiplication always comes before division, so 18 ÷ 9 · 2 = 18 ÷ 18 = 1.” They share one rank. Go left to right: 18 ÷ 9 = 2, then 2 · 2 = 4.
- “With x = −3, x² is −9.” Substitute with brackets: (−3)² = 9. The value −9 belongs to −x², where the power is done before the minus sign.
- Order: brackets, powers, multiplication and division left to right, addition and subtraction left to right.
- To evaluate, substitute the number for the letter and simplify.
- Put negative numbers in brackets: (−3)² = 9, but −3² = −9.
- Spreadsheets use * and ^, and apply a leading minus before a power.
Sources for this course (10)
- Curriculum: 교육부 고시 제2022-33호 [별책 8] 수학과 교육과정 (ncic.re.kr/inv/org/download.do?year=2022&seq=10003559&orgType=ogi4, PDF read 2026-10-19: 초등학교 3~4학년군 [4수02-01] 다양한 변화 규칙을 찾아 설명하고 수나 식으로 나타내기(규칙을 식으로 나타낼 때 혼합 계산식, 일반항을 나타낸 식 등을 이용해야 하는 복잡한 문제는 다루지 않음); 초등학교 5~6학년군 [6수01-01] 혼합 계산에서 계산하는 순서(계산 순서에 중점, 지나치게 복잡한 혼합 계산은 다루지 않음), [6수01-04] 약수·공약수·최대공약수, [6수02-01] 대응 관계를 □, △ 등을 사용하여 식으로(덧셈식, 뺄셈식, 곱셈식, 나눗셈식 중 하나로 표현되는 간단한 경우만); 중학교 1~3학년군 [9수01-02] 소인수분해로 최대공약수, 수와 연산 용어 거듭제곱·지수·밑·분배법칙, [9수02-01] 다양한 상황을 문자를 사용한 식으로 나타내어 유용성을 인식하고 식의 값 구하기, [9수02-02] 일차식의 덧셈과 뺄셈, [9수02-09] 다항식의 덧셈과 뺄셈, [9수02-10] (단항식)×(다항식), [9수02-14] 함숫값, [9수02-19] 다항식의 곱셈과 인수분해(역관계 이해); 변화와 관계 용어 대입, 다항식, 항, 단항식, 상수항, 계수, 차수, 일차식, 동류항, 등식, 전개, 변수, 인수, 인수분해; '식의 값', '전개식'은 교수·학습 상황에서 사용 가능; 문자와 수, 문자와 일상 언어의 공통점과 차이점 탐색)
- Textbooks: OpenStax Prealgebra 2e, 2.1 Use the Language of Algebra (Greg 20 and Alex 23, g + 3; variable and constant; × not used in algebra; expression like a phrase, equation like a sentence; 4 + 3·7 gives 25, not 49; PEMDAS and "Please Excuse My Dear Aunt Sally"; multiplication and division left to right, 18 ÷ 9·2; 18 ÷ 6 + 4(5 − 2); 5 + 2³ + 3[6 − 3(4 − 2)]; 2³ + 3⁴ ÷ 3 − 5²; work down the page: openstax.org/books/prealgebra-2e/pages/2-1-use-the-language-of-algebra)
- 2.2 Evaluate, Simplify, and Translate Expressions (evaluate by substituting; 9x − 2 at x = 5 and x = 1; term, coefficient, coefficient of x is 1; 9b + 15x² + a + 6; like terms 5x, 7, n², 4, 3x, 9n²; 3x + 7 + 4x + 5; 7x² + 8x − x² − 4x; eight more than y, seven less than 9z; window height 6 inches less than width; dimes 2 less than 5 times the quarters: .../pages/2-2-evaluate-simplify-and-translate-expressions)
- 7.3 Distributive Property (three friends at the movies, 3(9.25) = 3(9 + 0.25) = 27.75; a(b + c) = ab + ac, a(b − c), (b + c)a; 3(x + 4); 2(x − 3); 6(5y + 1); 100(0.3 + 0.25q): .../pages/7-3-distributive-property)
- 9.4 (perimeter of a rectangle P = 2L + 2W: .../pages/9-4-use-properties-of-rectangles-triangles-and-trapezoids)
- OpenStax Elementary Algebra 2e, 7.1 Greatest Common Factor and Factor by Grouping (GCF of 54 and 36 is 18; GCF of 27x³ and 18x⁴ is 9x³; four steps, distributive property in reverse, check by multiplying; 4x + 12, 5a + 5, 12x − 60, 4y² + 24y + 28, 5x³ − 25x², 21x³ − 9x² + 15x = 3x(7x² − 3x + 5), −8y − 24 = −8(y + 3), 5q(q + 7) − 6(q + 7): openstax.org/books/elementary-algebra-2e/pages/7-1-greatest-common-factor-and-factor-by-grouping)
- 2.6 (distance, rate and time formula d = rt: .../pages/2-6-solve-a-formula-for-a-specific-variable)
- Microsoft Support, "Calculation operators and precedence in Excel" (negation before %, ^, then * and /, then + and −; =5+2*3: support.microsoft.com/en-us/office/calculation-operators-and-precedence-in-excel-48be406d-4975-4d31-b2b8-7af9e0e2878a)
- History for the story block only: MacTutor History of Mathematics, University of St Andrews, "François Viète" (1540 to 1603; studied law, son of a lawyer; decoded letters to Philip II of Spain for Henry IV; In artem analyticam isagoge, Tours 1591, first systematic algebraic notation, vowels for unknowns and consonants for knowns; convention of early letters for knowns and late letters for unknowns introduced later by Descartes in La Géométrie: mathshistory.st-andrews.ac.uk/Biographies/Viete/)
- "René Descartes" (1596 to 1650; La Géométrie an appendix to the Discours de la méthode, published at Leiden in 1637: mathshistory.st-andrews.ac.uk/Biographies/Descartes/).
Checked: 2026-10-19