Order of operations

Work the grouping first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. PEMDAS is four ranks, not six steps.

  1. Grouping

    Parentheses, brackets, fraction bars, absolute value. Innermost first.

  2. Exponents

    Powers and roots, before any multiply or divide.

  3. × and ÷

    One rank. Whichever comes first from the left.

  4. + and −

    One rank. Whichever comes first from the left.

Multiply and divide from the left.

The letters put M before D, and A before S. The math does not. Same rank means you read the line from the left. Addition and subtraction are the next rank, and they work the same way.

30 ÷ 5 × 3

18

6 × 3. Divide first, because it is on the left.

2

30 ÷ 15. That multiplies first.

8 − 3 + 2

7

5 + 2. Subtract first, because it is on the left.

3

8 − 5. That saves the subtraction for last.

Equal ranks go left to right. Math is Fun’s PEMDAS page uses 30 ÷ 5 × 3 = 18. OpenStax Contemporary Mathematics, section 3.3, treats multiplication and division as one step, and addition and subtraction as the next.

One expression, four moves.

3 + 2² × (4 − 1). Each move fires one rank, then the line gets shorter. The colored piece is the only piece you touch.

  1. 3 + 2² × (4 − 1)

    Grouping. 4 − 1 is 3.

  2. 3 + 2² × 3

    Exponent. 2² is 4. The square stays on the 2, not on the 3 waiting beside it.

  3. 3 + 4 × 3

    Multiply. 4 × 3 is 12. Adding the 3 now would make 21.

  4. 3 + 12

    Add. This rank is last.

15

Follow the order of operations on the line in front of you with Stephen AI.

The fraction bar is a parenthesis.

A bar groups the whole top and the whole bottom. Same numbers, no bar, and the divide runs before the add.

8 + 4 2

= 6

The top is one group. 12 ÷ 2.

8 + 4 ÷ 2

= 10

Divide first. 8 + 2.

LibreTexts Elementary Algebra 1.7 counts parentheses, brackets, braces, the fraction bar, and absolute value as grouping symbols. The innermost group goes first, so 2[8 − (3 + 1)] is 2[8 − 4], which is 8. |3 − 7| + 2 is 4 + 2, which is 6. The bars close before you add.

PEMDAS, BODMAS, and GEMDAS.

Four names, one order. PEMDAS is the US name. BODMAS is the UK name, BEDMAS the Canadian one. GEMDAS says grouping, so the first rank is not only parentheses. The letters that swap are still one rank.

PEMDAS

BODMAS

MD and DM are the same blue on purpose. BODMAS does not mean you divide before you multiply. Please Excuse My Dear Aunt Sally lists a word for each letter. Read M and D as one step, and A and S as the next.

6 ÷ 2(1+2) is not a question.

Two ways of writing it are well-defined, and they disagree. The viral line jams a 2 against the parentheses, and that syntax has no worldwide rule. Rewrite it.

(6 ÷ 2)(1 + 2)9

6 ÷ (2(1 + 2))1

6 ÷ 2(1 + 2)?

David Linkletter, “The PEMDAS Paradox,” Plus Magazine, 17 June 2019. If the times sign is written out, 6 ÷ 2 × 3, US classrooms go left to right and get 9. A calculator that prints one of the two answers has picked a convention. It has not settled the line.

Questions,
with the ranks.

Do you multiply or divide first?

Neither one always goes first. Multiplication and division are the same rank, so you do whichever comes first from the left. 30 ÷ 5 × 3 is 6 × 3, which is 18. Multiplying first gives 2, and that is wrong.

What does PEMDAS stand for?

Parentheses, exponents, multiplication and division, addition and subtraction. US classrooms also say Please Excuse My Dear Aunt Sally. The phrase lists six words. The rule is four ranks, because multiplication and division share a rank and addition and subtraction share a rank.

Is BODMAS different from PEMDAS?

No. BODMAS is the name used in the UK: brackets, orders, division and multiplication, addition and subtraction. BEDMAS is the Canadian name. The D and the M swap places in the acronym. They do not swap places in the math.

What is GEMDAS?

GEMDAS means grouping, exponents, multiplication and division, addition and subtraction. Some newer US textbooks use it so a fraction bar, absolute value bars, and brackets are obviously part of the first rank, not only parentheses. Inside a group, follow the same order. The innermost group goes first.

Do you add or subtract first?

Neither. Addition and subtraction are one rank, left to right. 8 − 3 + 2 is 5 + 2, which is 7. Doing the subtraction last gives 3, and that is wrong.

Is 6 ÷ 2(1+2) equal to 1 or 9?

Write the parentheses and both answers are clear. (6 ÷ 2)(1 + 2) is 9. 6 ÷ (2(1 + 2)) is 1. The original line, with the 2 jammed against the parentheses, is not well-defined. David Linkletter argued that in Plus Magazine on 17 June 2019: there is no worldwide standard for implied multiplication. If a times sign is written, 6 ÷ 2 × 3, go left to right and you get 9.

Four ranks. Then your line.

Grouping, exponents, then left to right. The next expression is Stephen AI.

Stephen AI Get it for Free