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.

PEMDAS calculator with steps
Use + − * / (or × ÷), ^ for powers, √ for square roots, and ( ), [ ] or { } for grouping. Fractions such as 1/2 and decimals stay exact. 2(3) means 2 × 3.
Try:
Answer
8 + (6 − 2)2 ÷ 4 × 3 − 5 =
15
Working in PEMDAS order, 8 + (6 − 2)2 ÷ 4 × 3 − 5 = 15.
Steps6
Steps (6)
  1. Start8 + (6 − 2)2 ÷ 4 × 3 − 5
  2. 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
  3. EExponent: 42 = 16 (4 × 4).
    8 + 42 ÷ 4 × 3 − 5
    = 8 + 16 ÷ 4 × 3 − 5
  4. 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
  5. MMultiply: 4 × 3 = 12.
    8 + 4 × 3 − 5
    = 8 + 12 − 5
  6. 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
  7. SSubtract: 20 − 5 = 15.
    20 − 5
    = 15

Order of Operations Calculator (PEMDAS) with Steps
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

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:

  1. Parentheses and other grouping symbols: simplify inside them first, innermost first.
  2. Exponents (and roots).
  3. Multiplication and Division, in order from left to right.
  4. 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.

  1. Parentheses: 6 − 2 = 4, giving 8 + 4² ÷ 4 × 3 − 5.
  2. Exponent: 4² = 16, giving 8 + 16 ÷ 4 × 3 − 5.
  3. Division comes first because it is on the left: 16 ÷ 4 = 4, giving 8 + 4 × 3 − 5.
  4. Multiplication: 4 × 3 = 12, giving 8 + 12 − 5.
  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.

Question 1 of 10
1. Evaluate 5 + 3 × 4.

Found a mistake? Let us know!

2. Evaluate 24 ÷ 4 × 2.

Found a mistake? Let us know!

3. Evaluate 20 − 6 + 4.

Found a mistake? Let us know!

4. Evaluate (7 − 2)² − 3 × 4.

Found a mistake? Let us know!

5. What is −4²?

Found a mistake? Let us know!

6. Evaluate 2 + 3 × (8 − 5)².

Found a mistake? Let us know!

7. Evaluate 36 ÷ (2 + 4) × 3.

Found a mistake? Let us know!

8. Evaluate 1/2 + 1/4 × 2.

Found a mistake? Let us know!

9. Evaluate 3[10 − (2 + 1)²].

Found a mistake? Let us know!

10. Read strictly left to right (PEMDAS), what is 8 ÷ 2(2 + 2)?

Found a mistake? Let us know!

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

More fractions & numbers calculators

Browse all 206 calculators

Related to This Article

What people say about "PEMDAS Calculator: Order of Operations Solver With Steps"?

No one replied yet.

Leave a Reply