Order of Operations Calculator

PEMDAS
Live result

Use * / or × ÷, ^ for powers and ( ) for grouping. 2(3+4) means 2 × (3+4).

Examples:
Answer 4 steps
14
Steps4
Rules usedP · MD · AS
Basic calculator—
Answer isExact
Order: Parentheses → Exponents → Multiply & Divide (left to right) → Add & Subtract (left to right)
Step-by-Step:

An order of operations calculator solves an expression in the correct order and shows every step. Type a problem like 3 + 6 × (5 + 4) ÷ 3 − 7, and it works through the parentheses, exponents, multiplication and division, then addition and subtraction, highlighting each part as it goes.

PEMDAS Explained

The order of operations has 4 levels. Finish each level before moving to the next.

1. Parentheses

Work out anything in ( ) first, innermost first.

(2 + 3) × 4=20

2. Exponents

Powers and roots come next.

2 + 3²=11

3. Multiply & Divide

Equal rank: left to right.

12 ÷ 3 × 2=8

4. Add & Subtract

Equal rank: left to right.

10 − 4 + 3=9
PEMDAS, BODMAS, BIDMAS and BEDMAS are the same rule Different countries use different words: Brackets for parentheses, and Orders, Indices or Exponents for powers. The order of the letters D and M doesn't matter, because division and multiplication have equal rank.

Multiplication Doesn't Always Come First

The "M before D" in PEMDAS trips people up. Multiplication and division are equal, so you do whichever comes first, reading left to right.

Multiplying first Treating M as higher than D
Wrong
12 ÷ 3 × 2
3 × 2 = 6
12 ÷ 6 = 2
2
Left to right ÷ comes first, so do it first
Right
12 ÷ 3 × 2
12 ÷ 3 = 4
4 × 2 = 8
8
The same goes for + and − 10 − 4 + 3 is 6 + 3 = 9, not 10 − 7 = 3. Think of subtraction as adding a negative: 10 + (−4) + 3.

Expressions That Catch People Out

Try each of these in the calculator above to see the steps.

−3² = −9

The exponent comes before the minus sign, so it's −(3²). To square negative three, write (−3)² = 9.

2^3^2 = 512

Stacked exponents are worked from the top down: 3² = 9 first, then 2⁹ = 512, not (2³)² = 64.

6 ÷ 2(1 + 2)

Reading 2(1 + 2) as 2 × (1 + 2) and going left to right gives 9. Some textbooks give implied multiplication priority, which gives 1. Avoid the ambiguity with extra parentheses.

Why a 4 Function Calculator Disagrees

Most basic calculators work out each operation as soon as you press the next key. They don't wait to see the whole expression, so they ignore PEMDAS.

Typed straight in Each key works on the running total
Returns 20
2 + 3 × 4 =
2 + 3 = 5
5 × 4 = 20
20
Multiplication first Re-order the keystrokes
Returns 14
3 × 4 = then + 2 =
3 × 4 = 12
12 + 2 = 14
14
See it in the calculator above For expressions without parentheses or exponents, the Basic calculator box shows what a 4 function calculator would return if you typed the keys in order. For grouping on a calculator, try the calculator with parentheses.

How to Use the Order of Operations Calculator

Solve any arithmetic expression step by step in 3 steps.

  1. Type or Paste the Expression

    Use the symbol buttons if your keyboard doesn't have × or ÷. Spaces are optional.

  2. Read the Answer

    It updates as you type. If something is wrong, such as a missing bracket, a message tells you what to fix.

  3. Follow the Steps

    Each step is labeled with its rule and highlighted in the expression, so you can copy the working.

Practice

Test yourself with 10 order of operations practice problems, each with a worked answer.

Frequently Asked Questions

What is the order of operations?

The order of operations is the agreed order for solving an expression: parentheses first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. It is often remembered as PEMDAS.

Is PEMDAS the same as BODMAS?

Yes. PEMDAS, BODMAS, BIDMAS and BEDMAS use different words for the same rule: brackets or parentheses first, then exponents (orders or indices), then multiplication and division, then addition and subtraction. All of them give the same answer.

Does multiplication always come before division?

No. Multiplication and division have the same rank and are done from left to right. 12 ÷ 3 × 2 is 4 × 2 = 8, not 12 ÷ 6 = 2. The same applies to addition and subtraction: 10 − 4 + 3 = 9.

What is 6 ÷ 2(1 + 2)?

Under the standard rule the answer is 9: 2(1 + 2) means 2 × (1 + 2), and division and multiplication go left to right. Some textbooks and calculators give implied multiplication priority, which gives 1. The expression is ambiguous, so it's better written as (6 ÷ 2) × (1 + 2) or 6 ÷ (2 × (1 + 2)).

Why does my basic calculator give a different answer?

Most 4 function calculators work out each operation as soon as you press the next key, from left to right. Typing 2 + 3 × 4 = gives 20 on a basic calculator, but the order of operations gives 14. Enter the multiplication or division part first.

Is −3² equal to 9 or −9?

−3² is −9, because the exponent is applied before the negative sign: −(3²) = −9. To square negative three, write (−3)² = 9.