Order of Operations Calculator (PEMDAS) with Steps
Fractions & numbersFreeNo sign-up
The order of operations calculator works any arithmetic expression in PEMDAS order and highlights each step. For 8 + (6 − 2)² ÷ 4 × 3 − 5, do the parentheses (4), then the exponent (16), then divide and multiply from left to right (16 ÷ 4 = 4, 4 × 3 = 12), then add and subtract: 8 + 12 − 5 = 15.
Steps (6)
- Start8 + (6 − 2)2 ÷ 4 × 3 − 5
-
PSInside the parentheses, subtract: 6 − 2 = 4. The brackets now hold a single number, so they can be dropped.8 + (6 − 2)2 ÷ 4 × 3 − 5= 8 + (4)2 ÷ 4 × 3 − 5
-
EExponent: 42 = 16 (4 × 4).8 + 42 ÷ 4 × 3 − 5= 8 + 16 ÷ 4 × 3 − 5
-
DDivide: 16 ÷ 4 = 4. Multiplication and division have equal rank, so work from left to right: this division comes first.8 + 16 ÷ 4 × 3 − 5= 8 + 4 × 3 − 5
-
MMultiply: 4 × 3 = 12.8 + 4 × 3 − 5= 8 + 12 − 5
-
AAdd: 8 + 12 = 20. Addition and subtraction have equal rank, so work from left to right: this addition comes first.8 + 12 − 5= 20 − 5
-
SSubtract: 20 − 5 = 15.20 − 5= 15
What to type
- Operations: + and − for addition and subtraction, * or × for multiplication, / or ÷ for division, and ^ for powers (2^3), or the x² button.
- Grouping: parentheses ( ), brackets [ ] and braces { }, nested as deep as you like. Each one must close with its own type.
- Fractions and decimals: type 1/2 or 0.75. Answers stay exact, so 1/3 + 1/6 × 2 gives 2/3, not 0.6666667.
- Negative numbers: −4 + 9, or 5 − (−3). Use brackets to raise a negative number to a power: (−3)^2.
- Roots: √ for square roots and fractional exponents such as 8^(1/3), when the root comes out exact.
- Implied multiplication: 2(3 + 4) means 2 × (3 + 4). The settings let you choose how it ranks against ÷.
Letters, equations and irrational roots such as √2 are outside this tool; the message says so and points you to the right calculator.
What PEMDAS means
PEMDAS lists the order in which to do operations so that everyone gets the same answer from the same expression. The OpenStax Prealgebra textbook states it in four levels:
- Parentheses and other grouping symbols: simplify inside them first, innermost first.
- Exponents (and roots).
- Multiplication and Division, in order from left to right.
- Addition and Subtraction, in order from left to right.
Multiplication does not come before division just because M comes before D in the word. They share one level, and so do addition and subtraction. That is why 18 ÷ 3 × 2 is 12 (6 × 2) and not 3, and 10 − 4 + 3 is 9, not 3.
PEMDAS, BODMAS and BEDMAS: same rules, different names
| Acronym | Stands for | Where it is taught |
|---|---|---|
| PEMDAS | Parentheses, Exponents, Multiplication/Division, Addition/Subtraction | United States |
| BODMAS | Brackets, Orders, Division/Multiplication, Addition/Subtraction | UK, India, Australia and elsewhere |
| BEDMAS | Brackets, Exponents, Division/Multiplication, Addition/Subtraction | Canada |
| GEMS | Grouping, Exponents, Multiplication/Division, Subtraction/Addition | Some US classrooms |
All of them give the same answers. Choose your acronym in the calculator and the step labels change to match (O for Orders, B for Brackets).
Solving PEMDAS step by step: a full example
Evaluate 8 + (6 − 2)² ÷ 4 × 3 − 5.
- Parentheses: 6 − 2 = 4, giving 8 + 4² ÷ 4 × 3 − 5.
- Exponent: 4² = 16, giving 8 + 16 ÷ 4 × 3 − 5.
- Division comes first because it is on the left: 16 ÷ 4 = 4, giving 8 + 4 × 3 − 5.
- Multiplication: 4 × 3 = 12, giving 8 + 12 − 5.
- Addition, then subtraction, left to right: 8 + 12 = 20, then 20 − 5 = 15.
The common error is to multiply 4 × 3 before dividing, which turns the problem into 8 + 16 ÷ 12 − 5 and gives the wrong answer 13/3.
Worked examples to check
Multiplication before addition: 3 + 4 × 2²
Exponent first: 2² = 4. Then multiply: 4 × 4 = 16. Then add: 3 + 16 = 19.
Division and multiplication from left to right: 18 ÷ 3 × 2
Work left to right: 18 ÷ 3 = 6, then 6 × 2 = 12.
Parentheses with fractions: (1/2 + 1/3) × 6
Inside the parentheses, 1/2 + 1/3 = 3/6 + 2/6 = 5/6. Then 5/6 × 6 = 5.
Nested brackets: [2 + 3(4 − 1)]² ÷ {10 − (2 + 3)}
Start with the innermost groups: 4 − 1 = 3, then 3(3) = 9 and 2 + 9 = 11 in the brackets; 2 + 3 = 5, then 10 − 5 = 5 in the braces. Exponent: 11² = 121. Divide: 121 ÷ 5 = 121/5, which is 24 1/5 or 24.2.
Implied multiplication: why 6 ÷ 2(1 + 2) causes arguments
When a number sits right next to brackets, as in 2(1 + 2), it means multiply. The question is whether that multiplication ranks with ordinary × and ÷ or comes first.
- Strict left to right (PEMDAS as written, and how most calculators and programming languages read it): 6 ÷ 2(1 + 2) = 6 ÷ 2 × 3 = 3 × 3 = 9.
- Implied multiplication first (a convention in some textbooks and much science writing, where 1/2x means 1/(2x)): 6 ÷ 2(1 + 2) = 6 ÷ 6 = 1.
Neither rule is a universal standard, so the expression is ambiguous. The calculator uses the left-to-right reading by default, shows both answers whenever they differ, and lets you switch. The fix in your own writing is brackets: (6 ÷ 2)(1 + 2) = 9 or 6 ÷ [2(1 + 2)] = 1.
Negative numbers and exponents
An exponent applies only to the number it is attached to. In −3², the minus sign is not part of the base, so −3² = −(3²) = −9. To square negative three, write (−3)² = 9. The same rule makes −3² + 10 equal 1, while (−3)² + 10 equals 19. Stacked exponents are worked from the top down: 2^3^2 = 2^9 = 512, not (2³)² = 64.
Homework-style examples: simplify using order of operations
These follow the way homework sites word the problems: “Simplify the expression below using order of operations”, often with negative numbers in brackets, exponents and a fraction bar.
Negatives in brackets: −2 − (−3) × (3 + (−8))
Parentheses first: 3 + (−8) = −5, giving −2 − (−3) × (−5). Multiply before subtracting: (−3) × (−5) = 15, giving −2 − 15. Subtract: −2 − 15 = −17.
Check: two negatives multiply to a positive, so the product is +15, and taking 15 away from −2 lands at −17.
Exponents on negative numbers: 7² − (−4)² ÷ (−2) + 5
Exponents: 7² = 49 and (−4)² = 16, giving 49 − 16 ÷ (−2) + 5. Divide: 16 ÷ (−2) = −8, giving 49 − (−8) + 5. Add and subtract left to right: 49 + 8 = 57, then 57 + 5 = 62.
Check: subtracting −8 is the same as adding 8, so 49 + 8 + 5 = 62.
A fraction bar as grouping: [−1 − (−7)] / (4 − 6) ÷ [1³ − (−5)] / [8 + (−2)]
A fraction bar groups its top and its bottom, so work each one first. First fraction: −1 − (−7) = 6 on top and 4 − 6 = −2 below, so 6/(−2) = −3. Second fraction: 1³ − (−5) = 1 + 5 = 6 on top and 8 + (−2) = 6 below, so 6/6 = 1. Divide: −3 ÷ 1 = −3.
Check: dividing by 1 changes nothing, so the answer must equal the first fraction, −3.
No parentheses: −3² + (−5) − 10 × 7
Exponent: the square belongs to 3 only, so −3² = −9. Multiply: 10 × 7 = 70. That leaves −9 + (−5) − 70. Left to right: −9 + (−5) = −14, then −14 − 70 = −84.
Check: every term is negative (−9, −5 and −70), so the answer is negative and equals −(9 + 5 + 70) = −84.
Which steps of PEMDAS do you need for (4 · 5) − 3²?
List the operations that actually appear: parentheses (4 · 5), an exponent (3²), multiplication inside the parentheses and one subtraction. There is no division and no addition, so the steps are parentheses, exponents, multiplication, subtraction. Working: 4 · 5 = 20, 3² = 9, and 20 − 9 = 11.
Check: an answer choice that includes division or addition is wrong, because neither operation is in the expression.
Common mistakes to avoid
| Mistake | Example | Correct |
|---|---|---|
| Working strictly left to right, ignoring rank | 3 + 4 × 2 = 14 | 3 + 8 = 11 |
| Always multiplying before dividing | 18 ÷ 3 × 2 = 3 | 6 × 2 = 12 |
| Always adding before subtracting | 10 − 4 + 3 = 3 | 6 + 3 = 9 |
| Squaring the minus sign | −3² = 9 | −9 |
| Dropping brackets too early | 2 × (5 + 1) = 2 × 5 + 1 = 11 | 2 × 6 = 12 |
Keep practicing without the calculator
Open the Practice tab, pick Easy, Medium or Hard, and work each problem on paper before you type your answer. If it is wrong, press Show the steps and find the first line where your working differs; that line names the rule you missed. Hard problems mix negative numbers, fractions and nested brackets.
Order of operations practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Multiplication comes before addition: 3 × 4 = 12, then 5 + 12 = 17. Adding first gives the wrong answer 32.
Division and multiplication share a level, so go left to right: 24 ÷ 4 = 6, then 6 × 2 = 12. Multiplying first gives 3.
Addition and subtraction share a level, so go left to right: 20 − 6 = 14, then 14 + 4 = 18. Adding first gives 10.
The exponent applies to 4 only, then the minus sign: −(4²) = −16. To square −4, write (−4)², which is 16.
Parentheses: 3. Exponent: 9. Multiply: 27. Add: 2 + 27 = 29. Adding 2 + 3 first gives 45.
Parentheses: 6. Then left to right: 36 ÷ 6 = 6, and 6 × 3 = 18. Multiplying 6 × 3 before dividing gives 2.
Multiply first: 1/4 × 2 = 1/2. Then 1/2 + 1/2 = 1. Adding first gives (3/4) × 2 = 3/2.
Innermost first: 2 + 1 = 3, then 3² = 9, then 10 − 9 = 1 inside the brackets, and 3 × 1 = 3.
Parentheses: 4. Then 8 ÷ 2 = 4 and 4 × 4 = 16. If implied multiplication is done first, it is 8 ÷ 8 = 1, which is why brackets should be added to remove the doubt.
Quiz complete
Frequently asked questions
How do you solve PEMDAS step by step?
Simplify inside grouping symbols first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. For 12 − 2 × (1 + 3)² ÷ 8: 1 + 3 = 4, 4² = 16, 2 × 16 = 32, 32 ÷ 8 = 4, and 12 − 4 = 8.
Do calculators follow the order of operations?
Scientific and graphing calculators do. A basic four-function calculator often works each operation as soon as you press it, so 3 + 4 × 2 can show 14 instead of 11. Calculators also differ on implied multiplication, which is why 6 ÷ 2(1 + 2) gets different answers.
What is the PEMDAS rule?
It is the agreed order for evaluating expressions: Parentheses, Exponents, Multiplication and Division (left to right), Addition and Subtraction (left to right). BODMAS and BEDMAS are the same rule under other names.
How do you use PEMDAS on a calculator?
Type the whole expression with brackets where you need them, such as 2*(3+4), and let the calculator apply the order. On a basic calculator, work the parentheses and exponents yourself first, then do multiplication and division before addition and subtraction.
How do you simplify an expression with negative numbers using order of operations?
Use the same PEMDAS order and track the signs at each step. Subtracting a negative means adding: 5 − (−3) = 8. A negative times a negative is positive. For −2 − (−3) × (3 + (−8)), the steps are 3 + (−8) = −5, (−3) × (−5) = 15 and −2 − 15 = −17.
Does this calculator handle fractions?
Yes. Fractions and decimals are kept exact, so the answer to (1/2 + 1/3) × 6 is exactly 5 and 7 ÷ 3 is 7/3, shown with its mixed number 2 1/3 and repeating decimal 2.333….
How are exponents handled with negative numbers?
The exponent is done before the minus sign in front: −2^2 = −4, while (−2)^2 = 4. Stacked powers are read from the top down, so 2^3^2 = 2^9.
Related calculators
Sources
- OpenStax, Prealgebra, 2.1 Use the Language of Algebra (order of operations), checked November 2026.
More fractions & numbers calculators
Related to This Article
More math articles
- How to Compare Savings Options
- Mastering the Basics: The Significance of “Algebra I for Beginners” in Your Back-to-School List
- The Ultimate 7th Grade GMAS Math Course (+FREE Worksheets)
- Top 10 5th Grade SBAC Math Practice Questions
- Distributions in Line Plot
- Committee chairs
- Campaign-finance regulation
- Montana MAST Grade 7 Math Worksheets: 95 Free Printable PDFs with Step-by-Step Keys
- 7th Grade Math Worksheets for Georgia (Milestones): 95 Free Printable PDFs
- Price Elasticity: Percentage Changes, Midpoint and Revenue








What people say about "PEMDAS Calculator: Order of Operations Solver With Steps"?
No one replied yet.