BODMAS, BIDMAS and PEMDAS are three names for one set of rules about which part of an expression to work out first. Type any expression and this calculator evaluates it in the right order, shows every step, and shows what a strict left-to-right calculation would wrongly give.
BODMAS Calculator
Evaluate any expression using BODMAS / BIDMAS / PEMDAS and see every step in order, plus what a strict left-to-right calculation would wrongly give.
Starting values: the calculator opens with the expression 6 + 4 × (5 − 3)^2 ÷ 8 − 1, which evaluates to 7. You can type + − × ÷ or * and /, ^ for powers, and ( ), [ ] or { } for brackets. The calculator treats 2(3+4) as 2 × (3 + 4).
The rules
A calculator-site article gives the letters of BODMAS as Brackets, Orders (powers or square roots), Division, Multiplication, Addition and Subtraction. The calculator’s note says that BODMAS in the UK, BIDMAS and PEMDAS in the US describe the same rules:
- Brackets, or parentheses, first
- Orders, or exponents, next
- Division and multiplication together, from left to right
- Addition and subtraction together, from left to right
The letter order can mislead. Division does not come before multiplication, and addition does not come before subtraction. The same article states that operations of the same rank are worked through from left to right.
Worked examples
Example 1: the default expression
6 + 4 × (5 − 3)^2 ÷ 8 − 1. Brackets first: (5 − 3) = 2, giving 6 + 4 × 2^2 ÷ 8 − 1. Orders: 2^2 = 4, giving 6 + 4 × 4 ÷ 8 − 1. Multiplication and division from the left: 4 × 4 = 16, then 16 ÷ 8 = 2, giving 6 + 2 − 1. Addition and subtraction from the left: 6 + 2 = 8, then 8 − 1 = 7.
Example 2: why order matters
2 + 3 × 4. Multiplication comes before addition, so the answer is 2 + 12 = 14. Working strictly left to right gives 5 × 4 = 20, which is wrong.
Example 3: equal rank, left to right
18 ÷ 6 × 4 ÷ 8. The article works it as 18 ÷ 6 = 3, then 3 × 4 = 12, then 12 ÷ 8 = 1.5. Doing the multiplication first would give a different and incorrect answer.
Example 4: subtraction and addition together
8 − 3 + 2 is worked from the left: 8 − 3 = 5, then 5 + 2 = 7. Adding first, 3 + 2 = 5, and 8 − 5 = 3, is the common mistake.
Example 5: brackets and a power
10 − 2 × (3 + 1)^2. Brackets: 3 + 1 = 4. Orders: 4^2 = 16. Multiplication: 2 × 16 = 32. Subtraction: 10 − 32 = −22.
What the step-by-step output shows
The calculator lists the starting expression and then each step in order, with a short label saying which rule was applied. It also lists which parts of the rules your expression used, such as brackets, orders, and division and multiplication from left to right. Reading the steps next to your own working is the quickest way to find where a hand calculation went astray.
The strict left-to-right comparison
The calculator also evaluates the same expression strictly from left to right and compares the two results. If they differ, it says so and notes that this is the classic mistake BODMAS exists to prevent. If they agree, it says that the expression does not depend on the order. Example 2 is a quick way to see why this matters, since the two methods give 14 and 20.
The famous ambiguous expression
Expressions such as 8 ÷ 2(2 + 2) divide people because of the way implied multiplication is read. The calculator reads 2(2 + 2) as an ordinary multiplication, so it works through 8 ÷ 2 × 4 from the left and gets 16. An article in a mathematics blog notes that the ambiguity comes down to whether you compute left to right or do the multiplication on the right of the division sign first, one method giving 16 and the other 1. Its conclusion is that the blame belongs to whoever wrote the ambiguous question, and that the cure is to add brackets: (8 ÷ 2)(2 + 2) gives 16 and 8 ÷ (2(2 + 2)) gives 1.
Writing clear expressions
When you write an expression for someone else, use brackets to show what you mean, even where the rules would make them unnecessary. It costs nothing and removes the argument.
What the calculator does not do
- It treats implied multiplication as ordinary multiplication, which some textbooks and calculators do differently.
- It takes a limited length of expression, up to about 40 numbers.
- Its instructions describe numbers, operators and brackets only, so treat it as a tool for numeric expressions and not for algebra with letters.
- It shows the order in which operations were applied, not a lesson on why the rules are as they are. The rules are a convention agreed so that everyone gets the same answer.
- It does not check that your expression means what you intended.
For more general sums, see the scientific calculator.
Common mistakes to watch for
The most frequent error is treating the letters of the acronym as a strict sequence, so that multiplication is always done before division. Because they share a rank, 12 ÷ 3 × 2 is 4 × 2 = 8 and not 12 ÷ 6 = 2. The second most frequent is forgetting that a minus sign applies to the term that follows it, so 10 − 4 + 3 is 6 + 3 = 9, not 10 − 7 = 3. Typing your own examples into the calculator and reading the steps is a good way to build the habit.
Frequently asked questions
What does BODMAS stand for?
Brackets, Orders, Division, Multiplication, Addition and Subtraction. BIDMAS and PEMDAS describe the same rules with different names for the second letter.
Do I divide before I multiply?
No. Division and multiplication have equal rank, so you work through them from left to right. 18 divided by 6 times 4 divided by 8 is 1.5.
Why does 2 + 3 × 4 equal 14 and not 20?
Multiplication comes before addition, so 3 times 4 is worked out first, giving 2 + 12 = 14. Left to right would give 20.
What is 8 ÷ 2(2 + 2)?
The calculator reads it as 8 divided by 2 times 4, which is 16. Other readings give 1, so add brackets to make your meaning clear.
