All Tools

Order of Operations Solver

Type any expression with parentheses, exponents, multiplication, division, addition, and subtraction. The solver breaks it down one step at a time following the PEMDAS rule, with each operation color-coded so you can see exactly what happens and why.

Use * for multiply, / for divide, ^ for exponents. Press Enter to solve.

Try an example

Reference Guide

The PEMDAS Rule

PEMDAS tells you the order in which to evaluate a math expression. Work through the letters from left to right.

P Parentheses first. Evaluate everything inside grouping symbols.
E Exponents next. Evaluate powers and roots.
MD Multiplication and Division, left to right. These share the same priority.
AS Addition and Subtraction, left to right. These share the same priority.

Common Mistakes

Adding before multiplying

In 3+4×23 + 4 \times 2, the multiplication happens first. 4×2=84 \times 2 = 8, then 3+8=113 + 8 = 11. The answer is 11, not 14.

Working left-to-right everywhere

Left-to-right only applies within the same priority level. In 83+28 - 3 + 2, subtract first because it comes first (left-to-right), giving 7, not 3.

Forgetting nested parentheses

In 3×(4+22)3 \times (4 + 2^2), evaluate the exponent inside the parentheses first. 22=42^2 = 4, then 4+4=84 + 4 = 8, then 3×8=243 \times 8 = 24.

The Left-to-Right Rule

Multiplication and division are not "multiplication first." They have equal priority and are evaluated left-to-right. The same is true for addition and subtraction.

Example

12÷3×2=4×2=812 \div 3 \times 2 = 4 \times 2 = 8

If you multiply first you get 12÷6=212 \div 6 = 2, which is wrong. Always work left-to-right when operations share the same priority.

Parentheses Change Everything

Parentheses let you override the default order. Compare these two expressions that use the same numbers and operations but give different answers.

3+4×2=3+8=113 + 4 \times 2 = 3 + 8 = 11
(3+4)×2=7×2=14(3 + 4) \times 2 = 7 \times 2 = 14

Same numbers, same operations, but the parentheses change the answer from 11 to 14. Whenever you want to force an operation to happen first, wrap it in parentheses.