Order of Operations Calculator (PEMDAS / BODMAS) with Steps
Evaluate any arithmetic expression step by step using PEMDAS / BODMAS: parentheses first, then exponents, multiplication and division left to right, then addition and subtraction.
How it works
P — Parentheses (innermost first) → E — Exponents (right to left) → MD — Multiplication and Division, left to right → AS — Addition and Subtraction, left to right
The order of operations is the convention every calculator, spreadsheet and textbook uses so an expression has exactly one value. PEMDAS (US) and BODMAS or BIDMAS (UK, India, Australia) are the same rule with different names: brackets first, then powers (orders/indices), then multiplication and division as equals from left to right, then addition and subtraction as equals from left to right. This solver performs one operation at a time and rewrites the whole expression after each step, so you can compare it line by line with your own work.
Worked example
Evaluate 3 + 6 × (5 + 4) ÷ 3 − 7. Parentheses first: 5 + 4 = 9, giving 3 + 6 × 9 ÷ 3 − 7. Multiplication and division from the left: 6 × 9 = 54, then 54 ÷ 3 = 18, giving 3 + 18 − 7. Addition and subtraction from the left: 3 + 18 = 21, then 21 − 7 = 14. The answer is 14 after 5 steps.
Sources: Order of operations — Wikipedia · Order of operations — Math is Fun
Frequently asked questions
Does multiplication always come before division?
No. Multiplication and division have the same rank and are done left to right as they appear. In 8 ÷ 2 × 4 you divide first (4) and then multiply (16). The same applies to addition and subtraction: 10 − 3 + 2 = 9, not 5.
Are PEMDAS and BODMAS different?
They give identical answers. PEMDAS says Parentheses, Exponents, Multiplication/Division, Addition/Subtraction; BODMAS says Brackets, Orders, Division/Multiplication, Addition/Subtraction. Only the names and the order of the paired letters differ.
What is 6 ÷ 2(1 + 2)?
Under the standard convention used here, the parentheses give 3, then 6 ÷ 2 × 3 is worked left to right: 3 × 3 = 9. Some older texts give implied multiplication higher priority (answer 1), which is why such expressions are better written with explicit parentheses.
How are exponents stacked like 2^3^2 handled?
Powers are evaluated from the top down (right to left): 2^3^2 = 2^9 = 512. And −3^2 means −(3^2) = −9; write (−3)^2 if you want 9.
Can I use square brackets or braces?
Yes. [ ] and { } are treated as parentheses, and the innermost group is always simplified first.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.