
PEMDAS: What It Is and How the Order of Operations Works
PEMDAS is the mnemonic U.S. students use for the order of operations: Parentheses, Exponents, then Multiplication and Division (left to right), then Addition and Subtraction (left to right). The letters do not mean you always multiply before you divide, or add before you subtract. You can check the worked examples below in StudySim's order of operations calculator, also called a PEMDAS calculator.
| Term | Definition | Best for | Strength of evidence |
|---|---|---|---|
| PEMDAS | U.S. mnemonic for the order of operations: Parentheses, Exponents, Multiplication/Division, Addition/Subtraction | Evaluating expressions with more than one operation | A shared convention in school math, not a law of nature (Wikipedia; MathWorld) |
| Left-to-right rule | Multiply and divide as they appear from left to right; then add and subtract from left to right | Avoiding the "M before D" and "A before S" mistakes | Stated in standard school explanations (mathsisfun.com; CUNY Pressbooks) |
| BODMAS / BIDMAS / BEDMAS | The same order under other names, used in the U.K., other Commonwealth countries, Canada and New Zealand | Reading the same rules outside the U.S. | Documented as regional mnemonics for the same convention (Wikipedia; StudySim calculator) |
Try the Study guide generator
What is PEMDAS?
PEMDAS is an acronym for the order of operations in mathematics. According to Wolfram MathWorld, PEMDAS is an acronym used primarily in the United States to teach the order rules of computational precedence. The letters stand for Parentheses, Exponents, Multiplication, Division, Addition and Subtraction.
| Letter | Stands for | What to do |
|---|---|---|
| P | Parentheses | Evaluate grouping symbols first, innermost first if they are nested |
| E | Exponents | Then powers and roots |
| MD | Multiplication and Division | Then multiply or divide, left to right, as a single step |
| AS | Addition and Subtraction | Then add or subtract, left to right, as a single step |
In the United States, these conventions are often remembered with the phrase Please Excuse My Dear Aunt Sally, which spells PEMDAS.
For example, do you compute 2 + 5 × 3 as (2 + 5) × 3 or as 2 + (5 × 3)? The order of operations settles it: multiplication comes first, so the answer is 17.
How PEMDAS works
Work through an expression in four steps, rewriting after each one so you can see what is left.
1. Parentheses first
Evaluate anything inside parentheses, brackets or other grouping symbols first. For 4 × (5 + 3), first add 5 + 3 = 8, then 4 × 8 = 32. The answer is not (4 × 5) + 3 = 23.
2. Exponents next
Then do any exponents and square roots. For example, in mathsisfun.com’s 5 × 22: 22 = 4, so 5 × 4 = 20. You would get 102 = 100 if you multiplied 5 × 2 first. That’s not what the expression is asking for, though. A leading minus is usually weaker than a power, so −32 is −9, while (−3)2 is 9. StudySim's order of operations calculator uses that reading and treats stacked powers as grouping from the right: 2^3^2 means 2^(3^2) = 512, not (2^3)^2 = 64. If you want the other meaning, add parentheses.
3. Multiplication and division, left to right
Multiplication and division have the same rank. So the expression 30 ÷ 5 × 3 would be evaluated as 6 × 3 = 18 since the division occurs first as we work from left to right. The answer is not 30 ÷ 15 = 2.
4. Addition and subtraction, left to right
Addition and subtraction also share a rank. The expression 8 − 3 + 2 would be evaluated as 5 + 2 = 7 since the subtraction occurs first as we work from left to right. Doing the addition first, as if "A comes before S," gives 8 − (3 + 2) = 3, which is wrong.
Why the order of operations exists
The order of operations is a set of conventions that govern which operations get performed first in a (mathematical) expression that may not have parentheses to indicate order explicitly. Without a shared convention, the same line could give different answers. The order of operations is a convention (not a result that can be proved to be true or false) about which operations to perform first in a given expression, equation, or statement, when no parentheses are present, and has been formalized as precedence in mathematics. School math, science writing and many programming languages share that ranking. In this order, operations that alter a number more dramatically (i.e. exponentiation) come before operations that alter them less (i.e. addition). In mathematics and computer programming, the same order is followed when evaluating any given expression (e.g., 3 + 4 × 2 − 6 = 5). It’s the same reason that, in grade-school arithmetic (and in most programming languages), 2 + 5 × 3 is 17 and not 21: Multiplication and division bind tighter than addition and subtraction, so 8 + 2 × 5 = 8 + (2 × 5) = 8 + 10 = 18.
PEMDAS vs BODMAS, BIDMAS and BEDMAS
According to Wikipedia, PEMDAS (also remembered by similar acronyms like BODMAS, BIDMAS and BEDMAS) is a mnemonic used in mathematics and computer programming to describe the relative precedence of addition and subtraction on the one hand, and multiplication and division (and exponentiation and bracketed terms) on the other. StudySim's calculator states that PEMDAS and BODMAS are the same order: Parentheses/Brackets, Exponents/Orders, Multiplication and Division left to right, then Addition and Subtraction left to right.
| Mnemonic | Where it is common | First two letters | Same left-to-right rule? |
|---|---|---|---|
| PEMDAS | United States (and sometimes France) | Parentheses, Exponents | Yes: MD together, AS together |
| BODMAS (or BOMDAS) | United Kingdom and other Commonwealth countries | Brackets, Orders (or "Of") | Yes: DM together, AS together |
| BIDMAS | Also used in the U.K. | Brackets, Indices | Yes |
| BEDMAS | Canada and New Zealand | Brackets, Exponents | Yes |
"Orders" and "indices" are other names for exponents, including roots, and "Of" refers to multiplication of fractions (as in "one half of 12").
Worked PEMDAS examples
Try each one by hand, then paste the expression into the PEMDAS calculator (write multiplication with *, for example 2*(3+4)).
Parentheses change the value
8 + 2 × 5 = 18, because multiplication comes before addition: 2 × 5 = 10, then 8 + 10 = 18. Likewise, the expression (8 + 2) × 5 would be evaluated as 10 × 5 = 50 since the operation in the parentheses must be performed first.
Exponents, then multiply, then add
In 3 + 42 × (8 − 5), the operation within the parentheses, 8 − 5 = 3, should be performed first. Next the exponent: 42 = 16. Then 16 × 3 = 48, so 3 + 16 × 3 = 3 + 48 = 51.
Nested grouping
For 2 × [3 + (42 − 6)], work inside the innermost group first: 42 − 6. Start with the exponent: 42 = 16. Subtract 6: 16 − 6 = 10. Then the brackets: 2 × (3 + 10) = 2 × 13 = 26.
A longer left-to-right line
For 7 − 4 ÷ 2 + 32, the exponent is first: 32 = 9. Then division: 4 ÷ 2 = 2. Then left to right: 7 − 2 + 9 = 14.
Division twice in a row
Work left to right: 16 ÷ 4 ÷ 2 = 4 ÷ 2 = 2. Grouping the second division first is a different expression: 16 ÷ (4 ÷ 2) = 16 ÷ 2 = 8, so add parentheses only if that is what you mean.
Common PEMDAS mistakes
Here are some of the most common errors people make when dealing with PEMDAS and variations.
Doing all multiplication before any division
In 30 ÷ 5 × 3, multiplication is not a higher rank than division. Left to right, the answer is 18, not 2. The same trap shows up in 16 ÷ 4 ÷ 2 if you start on the right.
Doing all addition before any subtraction
The answer is not 8 − (3 + 2) = 3. Wikipedia flags this reading of a − b + c as a − (b + c) as an example of a misleading interpretation of PEMDAS-type mnemonics.
The viral problem: 6 ÷ 2(1+2)
6 ÷ 2(1 + 2) = ? The parentheses give 1 + 2 = 3, so the line becomes 6 ÷ 2(3), but from there people split into two camps about what to do next.
The first group interprets multiplication and division to be on an equal footing and works from left to right. When two operations are on equal footing, perform the operations in the order in which they appear, from left to right. If you consider 2(3) to be ordinary multiplication, and thus of equal standing with ÷, then 6 ÷ 2 × 3 = 3 × 3 = 9. This agrees with the interpretation given by the calculator on StudySim's website: 6 / 2 * (1 + 2) = 9.
The second group interprets the multiplication symbol in 6 ÷ 2(3) to be different from the multiplication symbol in 6 ÷ 2 × 3, giving multiplication by juxtaposition (placing numbers or variables next to each other to indicate multiplication) precedence over division, so 6 ÷ 2(3) means 6 ÷ (2 × 3) = 1. This problem is discussed in an article titled "PEMDAS Paradox" in Plus magazine, and according to the Math Doctors the correct interpretation is simply a matter of convention, not law.
If you want the answer to be 9, write (6 ÷ 2)(1+2). If you want the answer to be 1, write 6 ÷ (2(1+2)). If you are checking work in a PEMDAS calculator, you must use the multiplication operator: instead of writing 2(3+4), you would enter 2*(3+4).
How to use a PEMDAS calculator
Give these problems a shot before entering them into the calculator. StudySim's order of operations calculator will evaluate arithmetic expressions, including powers and parentheses, right in your browser. When in doubt, add extra parentheses to make clear what you're asking the calculator to do. For example, type 2*(3+4), not 2(3+4). All calculations are performed on your device. Nothing you type is saved or sent to a calculation service, and reloading clears what you typed.
The same tool sits with StudySim's other student calculators, and a short walkthrough is in the everyday student calculators tutorial. Download the printable PEMDAS checklist and practice set (PDF).
FAQ
What does PEMDAS stand for?
Parentheses, Exponents, Multiplication, Division, Addition and Subtraction. Multiplication and division are one step, done left to right. Addition and subtraction are one step, also done left to right.
Is PEMDAS the same as BODMAS?
Yes. PEMDAS and BODMAS (and BIDMAS and BEDMAS) name the same order. Brackets are parentheses, and orders or indices are exponents. The left-to-right rule for multiply/divide and add/subtract is the same.
Do you multiply before you divide in PEMDAS?
No. After parentheses and exponents, multiply and divide from left to right, in the order they appear. 30 ÷ 5 × 3 is 18, not 2.
What is the answer to 6 ÷ 2(1+2)?
It depends on the convention you apply after the parentheses. Strict left-to-right multiplication and division gives 9. Treating implied multiplication as tighter gives 1. Write (6 ÷ 2)(1+2) or 6 ÷ (2(1+2)) so the meaning is not in doubt.
What is a PEMDAS calculator?
A PEMDAS calculator, or order of operations calculator, evaluates an arithmetic expression using the standard order: grouping, then exponents, then multiply/divide left to right, then add/subtract left to right. StudySim's version runs in your browser and expects explicit operators such as *.
Why do some calculators disagree?
Some devices follow strict left-to-right multiplication and division. Others give implied multiplication, like 2(3), a higher rank than ÷. Exponent stacking and leading minuses can also differ. If a result surprises you, rewrite the expression with parentheses and compare.
About the author
Jozef Gherman is the founder of XYZAI, the company behind StudySim, where he builds AI tools that help students and writers study smarter and write with confidence. He writes about study techniques, exam prep, and practical ways to use AI for learning.


