Algebra
PEMDAS: Order Of Operations Rules, Examples And Tricks
Last updated: October 2026
PEMDAS is a memory aid for the order of operations: Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. Work inside parentheses first, then exponents. Next, do multiplication and division from left to right, then addition and subtraction from left to right. So 3 + 6 × 2 = 3 + 12 = 15, not 18.
The most common mistake is thinking multiplication always comes before division. It does not, and this guide shows why.
What Does PEMDAS Stand For?
PEMDAS is an acronym where each letter stands for one type of math operation, listed in the order you do them.
| Letter | Stands for | Symbols | Example |
|---|---|---|---|
| P | Parentheses | ( ), [ ], { } | (2 + 3) |
| E | Exponents | ², ³, ^, √ | 4² |
| M | Multiplication | ×, *, · | 3 × 5 |
| D | Division | ÷, / | 12 ÷ 4 |
| A | Addition | + | 7 + 2 |
| S | Subtraction | – | 9 – 6 |
The most popular memory phrase in US classrooms is "Please Excuse My Dear Aunt Sally." Each word starts with the same letter as a step in PEMDAS.
The Order Of Operations Rules, Step By Step
The order of operations has four levels, not six. Multiplication and division share one level, and addition and subtraction share another. Within each shared level, you work from left to right.
| Step | What to do | Direction |
|---|---|---|
| 1 | Parentheses and other grouping symbols | Innermost first |
| 2 | Exponents and roots | Right to left when stacked |
| 3 | Multiplication and division | Left to right |
| 4 | Addition and subtraction | Left to right |
Step 1: Parentheses And Grouping Symbols
Anything inside parentheses gets worked out first, no matter what operation it is. Parentheses are how you tell the reader, "do this part before anything else."
- 2 × (3 + 4) = 2 × 7 = 14
- Without parentheses: 2 × 3 + 4 = 6 + 4 = 10
Parentheses are not the only grouping symbols. All of these count as "P":
- Brackets [ ] and braces { }, used when parentheses are nested
- A fraction bar, which groups everything above it and everything below it
- Absolute value bars | |
- A square root sign, which groups everything underneath it
With nested symbols, start with the innermost pair and work outward:
2 × [3 + (5 – 1) × 2] = 2 × [3 + 4 × 2] = 2 × [3 + 8] = 2 × 11 = 22
Step 2: Exponents And Roots
After grouping symbols, work out exponents and roots. An exponent tells you how many times to multiply a number by itself, so 4² = 4 × 4 = 16.
Stacked exponents go from the top down. In 2³², the 3² part comes first:
- 2³² = 2⁹ = 512
- Not (2³)² = 8² = 64
Watch the negative sign. An exponent applies only to what sits directly under it:
- -3² = -(3 × 3) = -9
- (-3)² = (-3) × (-3) = 9
If you need to check a tricky power, an exponent calculator shows the result instantly.
Step 3: Multiplication And Division, Left To Right
Multiplication and division are equal partners. Do whichever comes first as you read from left to right.
Example: 12 ÷ 6 × 3 ÷ 2
- 12 ÷ 6 = 2
- 2 × 3 = 6
- 6 ÷ 2 = 3
Doing the multiplication first would give a wrong answer.
Step 4: Addition And Subtraction, Left To Right
Addition and subtraction work the same way as multiplication and division. They share a level, and you go left to right.
Example: 20 – 4 + 3
- Left to right: 20 – 4 = 16, then 16 + 3 = 19 ✓
- Addition first (wrong): 4 + 3 = 7, then 20 – 7 = 13 ✗
A and S appear in order in the word, but they are equal in rank.
Why &Quot;Please Excuse My Dear Aunt Sally&Quot; Can Mislead You
The phrase helps you remember the letters, but it hides the fact that M and D, and A and S, are pairs. Many students read it as six separate steps.
Some teachers write it as P E (MD) (AS) or draw a box around MD and AS to show they belong together. Another way to think about it: division is multiplying by a fraction (÷ 4 is the same as × 1/4), and subtraction is adding a negative (- 3 is + (-3)). Seen that way, there are really only two operations at those levels.
PEMDAS Examples, From Easy To Hard
These eight examples show the order of operations in action. Try each one yourself before reading the steps.
Example 1: Multiplication Before Addition
3 + 6 × 2
- Multiply: 6 × 2 = 12
- Add: 3 + 12 = 15
Example 2: Parentheses Change Everything
(3 + 6) × 2
- Parentheses: 3 + 6 = 9
- Multiply: 9 × 2 = 18
Same numbers as Example 1, but the parentheses change the answer from 15 to 18.
Example 3: An Exponent And Division
4 + 8 ÷ 2² – 1
- Exponent: 2² = 4
- Divide: 8 ÷ 4 = 2
- Add and subtract left to right: 4 + 2 – 1 = 5
Example 4: Every Level At Once
10 – 2 × 3 + 4² ÷ 8
- Exponent: 4² = 16
- Multiply and divide left to right: 2 × 3 = 6, then 16 ÷ 8 = 2
- Now you have 10 – 6 + 2
- Left to right: 10 – 6 = 4, then 4 + 2 = 6
Example 5: Parentheses With An Exponent Outside
3 × (2 + 4)² – 10 ÷ 5
- Parentheses: 2 + 4 = 6
- Exponent: 6² = 36
- Multiply and divide: 3 × 36 = 108, and 10 ÷ 5 = 2
- Subtract: 108 – 2 = 106
Example 6: Division Before Multiplication
50 – (12 + 18) ÷ 6 × 2
- Parentheses: 12 + 18 = 30
- Left to right: 30 ÷ 6 = 5, then 5 × 2 = 10
- Subtract: 50 – 10 = 40
Example 7: A Fraction Bar As A Grouping Symbol
(8 + 4) / (2 × 3), written as a fraction with 8 + 4 on top and 2 × 3 on the bottom
- Top: 8 + 4 = 12
- Bottom: 2 × 3 = 6
- Divide: 12 ÷ 6 = 2
When you type this into a calculator, you must add the parentheses yourself. Typing 8 + 4 ÷ 2 × 3 gives 14, not 2.
Example 8: The Viral Puzzle
56 ÷ 7 + 9 × 3 – 12
- Multiply and divide left to right: 56 ÷ 7 = 8, then 9 × 3 = 27
- Now you have 8 + 27 – 12
- Left to right: 8 + 27 = 35, then 35 – 12 = 23
Why Order Of Operations Matters
The order of operations exists so that everyone gets the same answer from the same expression. Without a shared rule, 3 + 6 × 2 could mean 15 or 18, depending on who reads it.
It shows up in everyday math more than people expect:
- Shopping: 3 shirts at $12 plus $5 shipping is 3 × 12 + 5 = $41. Adding first would give 3 × 17 = $51.
- Recipes: doubling a recipe that needs 2 cups plus 1/2 cup is 2 × (2 + 1/2) = 5 cups. Without the parentheses, 2 × 2 + 1/2 = 4 1/2 cups.
- Formulas: the area of a circle, A = πr², means square the radius first, then multiply by π.
Every algebra and science formula assumes you know these rules.
PEMDAS Vs BODMAS, BIDMAS, BEDMAS And GEMDAS
PEMDAS, BODMAS, BIDMAS and BEDMAS all describe the same order of operations. They just use different words for the same steps.
| Acronym | Where it is common | What the letters mean |
|---|---|---|
| PEMDAS | United States | Parentheses, Exponents, Multiplication, Division, Addition, Subtraction |
| BODMAS | UK, India, Australia and others | Brackets, Orders, Division, Multiplication, Addition, Subtraction |
| BIDMAS | UK | Brackets, Indices, Division, Multiplication, Addition, Subtraction |
| BEDMAS | Canada | Brackets, Exponents, Division, Multiplication, Addition, Subtraction |
| GEMDAS | Some US classrooms | Grouping, Exponents, Multiplication, Division, Addition, Subtraction |
Notice that BODMAS puts D before M, while PEMDAS puts M before D. That does not mean the rules differ. In both systems, multiplication and division share one level and go left to right. The order of the letters is just the order of the words.
"Orders" and "indices" are British terms for exponents. GEMDAS swaps "parentheses" for "grouping" to remind students that brackets, fraction bars and root signs count too.
The 8 ÷ 2(2 + 2) Debate: Why PEMDAS Goes Viral
Puzzles like 8 ÷ 2(2 + 2) spread online because people get two different answers: 16 and 1. The problem is not PEMDAS itself. It is that the expression is written in an unclear way.
The strict PEMDAS reading gives 16:
- Parentheses: 2 + 2 = 4
- Now it is 8 ÷ 2 × 4
- Left to right: 8 ÷ 2 = 4, then 4 × 4 = 16
The other reading gives 1:
Some people, and some older textbooks, treat 2(4) as one tightly joined unit. This is called implied multiplication (or multiplication by juxtaposition). Under that view, 2(4) = 8 happens first, so 8 ÷ 8 = 1.
Under the standard rules taught in US schools, the answer is 16. A clear writer would avoid the problem and use 8 ÷ (2(2 + 2)) if they meant 1, or (8 ÷ 2)(2 + 2) if they meant 16.
The lesson is simple. If an expression could be read two ways, add parentheses.
Order Of Operations In Calculators, Excel And Code
Most calculators and programs follow PEMDAS, but a few have quirks that matter when you type in formulas.
| Tool | How it handles order of operations | Watch out for |
|---|---|---|
| Basic four-function calculator | Often works left to right as you type | 3 + 6 × 2 may show 18 |
| Scientific and graphing calculators | Follow the standard order | Implied multiplication can vary by brand |
| Microsoft Excel | Follows the standard order for ×, ÷, + and – | Negation comes before exponents, so =-3^2 gives 9 |
| Google Sheets and most programming languages | Follow the standard order | Use ** or ^ for exponents, depending on the language |
The Excel rule surprises many people. In math class, -3² = -9. In Excel, the minus sign is applied first, so =-3^2 returns 9. Microsoft lists this in its Excel operator precedence guide. To get -9 in Excel, type =-(3^2).
For homework, use a scientific calculator that respects the order of operations, and add parentheses whenever you are unsure.
When Students Learn The Order Of Operations
In schools that follow the Common Core State Standards, students start using grouping symbols in grade 5 and learn the full order of operations with exponents in grade 6.
| Grade | What students do |
|---|---|
| Grade 5 | Use parentheses, brackets or braces in expressions and evaluate them |
| Grade 6 | Perform operations, including whole-number exponents, in the conventional order when there are no parentheses (the order of operations) |
| Grade 7 and up | Apply the rules to fractions, negative numbers and algebraic expressions |
Algebra depends on these rules, which is why an algebra calculator shows each step in PEMDAS order.
Common PEMDAS Mistakes To Avoid
Most PEMDAS mistakes come from treating the letters as six separate steps or from ignoring hidden grouping. This table shows the ones that cost the most points.
| Mistake | Wrong | Right |
|---|---|---|
| Multiplying before dividing every time | 12 ÷ 2 × 3 = 12 ÷ 6 = 2 | 12 ÷ 2 × 3 = 6 × 3 = 18 |
| Adding before subtracting every time | 10 – 3 + 2 = 10 – 5 = 5 | 10 – 3 + 2 = 7 + 2 = 9 |
| Applying an exponent to a negative sign | -4² = 16 | -4² = -16 |
| Ignoring a fraction bar's grouping | (6 + 4)/2 = 6 + 2 = 8 | (6 + 4)/2 = 10/2 = 5 |
| Working left to right through everything | 2 + 3 × 4 = 5 × 4 = 20 | 2 + 3 × 4 = 2 + 12 = 14 |
| Stacked exponents bottom up | 2³² = 8² = 64 | 2³² = 2⁹ = 512 |
A good habit: rewrite the whole expression after each step. One line per step makes mistakes easy to spot.
Practice Problems With Answers
Try these six problems, then check below.
- 7 + 3 × 4
- 18 ÷ 3 × 2 + 4² – (6 + 1)
- 5 + 2 × 3² – (8 – 4) ÷ 2
- (15 – 3) ÷ 4 + 2³ × 2
- 100 ÷ (5 × 2²) + 3 × 7
- 9 – 3 ÷ (1/3) + 1
Answers
- 19. 3 × 4 = 12, then 7 + 12.
- 21. Parentheses: 7. Exponent: 16. Left to right: 18 ÷ 3 = 6, 6 × 2 = 12. Then 12 + 16 – 7 = 21.
- 21. Exponent: 9. Parentheses: 4. Then 2 × 9 = 18 and 4 ÷ 2 = 2. Finally 5 + 18 – 2 = 21.
- 19. 12 ÷ 4 = 3, and 2³ × 2 = 8 × 2 = 16. Then 3 + 16 = 19.
- 26. 2² = 4, 5 × 4 = 20, 100 ÷ 20 = 5, 3 × 7 = 21. Then 5 + 21 = 26.
- 1. Dividing by 1/3 is the same as multiplying by 3, so 3 ÷ (1/3) = 9. Then 9 – 9 + 1 = 1. A fraction calculator can confirm fraction steps like this one.
Summary
PEMDAS is the US memory aid for the order of operations: Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. The key rule is that multiplication and division share a level, as do addition and subtraction, and each pair is worked from left to right.
Grouping symbols include brackets, fraction bars and root signs. Exponents apply only to what sits directly under them, so -3² = -9. BODMAS, BIDMAS and BEDMAS follow the same rules with different names.
Next step: work through the six practice problems above, writing one line per step. Then try writing the viral puzzle 8 ÷ 2(2 + 2) in two clear ways, one that equals 16 and one that equals 1.
Frequently Asked Questions
What is PEMDAS called now?
PEMDAS is still the most common name in the United States, but some teachers now use GEMDAS, where G stands for "grouping." The change reminds students that brackets, braces, fraction bars and root signs count as grouping symbols, not just parentheses. The rules themselves have not changed. Other countries use BODMAS, BIDMAS or BEDMAS for the same order of operations.
Are PEMDAS and BODMAS the same?
Yes, PEMDAS and BODMAS describe the same order of operations. PEMDAS is used mostly in the United States, and BODMAS is common in the UK, India and many other countries. BODMAS lists division before multiplication, and PEMDAS lists multiplication first, but in both systems these two operations share one level and are worked from left to right. Both give identical answers.
Does PEMDAS work with variables in algebra?
Yes. The order of operations is the same with letters as with numbers. In 3x² + 2 with x = 4, you square first (16), multiply by 3 (48), then add 2 to get 50. Writing 3x² never means (3x)². If you want the 3 squared too, the expression must show parentheses: (3x)² = 9x² = 144 when x = 4.
Do you always do parentheses first?
Yes, you always work out what is inside parentheses before anything outside them. But inside the parentheses, the normal order of operations still applies. In (2 + 3 × 4), you multiply 3 × 4 = 12 first, then add 2 to get 14. If there are several layers of parentheses, start with the innermost set and work your way outward.
Where do square roots fit in PEMDAS?
Square roots and other roots are treated at the same level as exponents, since a square root is the same as raising a number to the power of 1/2. The root sign also acts as a grouping symbol, so you simplify everything under it first. For example, √(9 + 16) means add 9 + 16 = 25 first, then take √25 = 5.
Try it with your own numbers
Use a free CalcSolver tool to check the examples in this guide.