When an expression mixes brackets, powers, multiplication and addition, the answer depends entirely on the order in which you work. This order of operations calculator follows the convention taught in every school — brackets first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right — and shows the whole expression again after each single operation, so you can compare it line by line with your own work.
It is a PEMDAS calculator with solution: instead of a bare number you get the worked solution, as a teacher would write it on the board. Results stay exact: gives , not 0.4999999, and gives exactly 0.3. When the expression contains an implied multiplication such as , the calculator also tells you what the answer would be under the other popular reading.
Everything runs in your browser; it is a free step-by-step calculator with no sign-up. For fraction-heavy homework, the fraction calculator adds simplification and mixed numbers; for powers and roots, see the exponent calculator.
How to use this calculator
- Type the expression. Use + and − for addition and subtraction, × or * for multiplication, ÷ or / for division, and ^ for powers (4^2 means 4²). Round ( ), square [ ] and curly { } brackets are all accepted.
- A minus sign at the start or after an operator is a negative sign: 3 × −2 = −6.
- Writing a number straight before a bracket, as in 2(5 + 1), means multiplication.
- Read the result, its decimal value and, when it is not a whole number, its exact fraction.
- Open the steps: each line names the rule that was applied, shows the single operation and rewrites the remaining expression — the calculator with work shown that homework asks for.
The formula
The convention is usually remembered with an acronym. All of them describe the same order:
| Acronym (where used) | Meaning |
|---|---|
| PEMDAS (US) | Parentheses, Exponents, Multiplication/Division, Addition/Subtraction |
| BODMAS (UK, India, Africa) | Brackets, Orders, Division/Multiplication, Addition/Subtraction |
| BIDMAS (UK) | Brackets, Indices, Division/Multiplication, Addition/Subtraction |
| GEMS (Australia, NZ) | Grouping, Exponents, Multiplication/Division, Subtraction/Addition |
Two details matter more than the letters. First, multiplication and division share one rank, and so do addition and subtraction: within a rank you work strictly from left to right, so and . PEMDAS does not mean "multiply before dividing". Second, powers group from the top down: , while a leading minus applies after the power, .
Worked example
Full example. :
- 2 + 3 × 4^2 − 4 ÷ 2
- 2 + 3 × 16 − 4 ÷ 2
- 2 + 48 − 4 ÷ 2
- 2 + 48 − 2
- 50 − 2
- 48
The answer is 48: brackets gave 4, the power gave 16, then and left to right, and finally .
Quick checks. = 50; = 20; = 2; = 512; = −9; = 1/2; = 0.3.
PEMDAS vs BODMAS vs BIDMAS: is there any difference?
No — they are three spellings of one rule. "Orders" and "indices" are British words for exponents, and the D–M swap in BODMAS is harmless because division and multiplication have equal rank and are done left to right anyway. A BODMAS calculator online and a PEMDAS calculator must therefore give the same answer for any expression written with explicit operators. Mistakes come from reading the acronym literally: doing every addition before every subtraction, for example, turns into 3 instead of 9.
The 6 ÷ 2(1 + 2) debate
This expression keeps going viral because it is genuinely ambiguous. Read with strict PEMDAS, the implied multiplication is an ordinary multiplication: . Many algebra textbooks, physics journals and some calculators, however, treat a number written against a bracket as a single block ("juxtaposition binds tighter"), giving .
This calculator applies the strict left-to-right rule, which is what most school curricula and programming languages use, and prints the other reading underneath whenever it differs. The real lesson is a writing rule: if an expression could be read two ways, add brackets — or — or use a fraction bar.
Frequently asked questions
What is the correct order of operations?
Brackets first (innermost first), then exponents, then multiplication and division from left to right, then addition and subtraction from left to right.
Does multiplication always come before division?
No. They have the same priority, so you do whichever comes first reading from left to right. 12 ÷ 3 × 2 = 4 × 2 = 8, not 12 ÷ 6 = 2.
Why is −3² equal to −9 and not 9?
The exponent applies only to the number it touches, 3, and the minus sign is applied afterwards: −(3²) = −9. To square −3, write (−3)², which is 9.
How do I enter a fraction?
Type it with a slash, for example 3/4. Because division and multiplication share a rank, put a fraction in brackets when it is multiplied or divided by something else: 2 ÷ (3/4) rather than 2 ÷ 3/4.
Is this step by step calculator free?
Yes. There is no account, no limit on the number of expressions and nothing is sent to a server: the steps are computed in your browser.
Sources
- OpenStax, Prealgebra 2e — §2.1 Use the Language of Algebra (order of operations)
- Weisstein, Precedence — Wolfram MathWorld
Last updated: