Concept

Order of Operations on a Calculator (PEMDAS / BODMAS)

Agarapu Ramesh — Editor and content reviewer

When an expression mixes several operations, the calculator follows a fixed precedence rule. PEMDAS (US) and BODMAS (UK / India) are the same rule with different acronyms: Brackets/Parentheses first, then Exponents/Orders, then Multiplication and Division (left to right), then Addition and Subtraction (left to right).

PEMDAS vs BODMAS — same rule, different names

PEMDAS = Parentheses, Exponents, Multiplication, Division, Addition, Subtraction. BODMAS = Brackets, Orders (powers), Division, Multiplication, Addition, Subtraction. Both produce identical answers. The 'MD' and 'DM' swap is meaningless because multiplication and division share the same priority — they are evaluated left to right when they appear together.

Worked examples — getting it right

2 + 3 × 4 = 14, not 20. The calculator does 3 × 4 first (= 12), then 2 + 12 = 14. With brackets: (2 + 3) × 4 = 5 × 4 = 20. Both are valid answers to different expressions — the brackets change which operation comes first. Another: 10 − 6 ÷ 2 = 10 − 3 = 7, not 2. The division goes first.

Exponents are right-associative

2^3^2 means 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64. Powers stack right to left. If you want the other interpretation, use brackets: (2^3)^2 = 64. This catches students out — most other operators work left to right. The convention follows mathematical writing: when you see 2^(3^2) on paper, the top exponent runs first.

Negative numbers and powers

−2² = −4, but (−2)² = 4. Without brackets, the exponent applies only to the 2, then the minus sign is applied: −(2²) = −4. With brackets, the negative is part of the base: (−2)² = (−2) × (−2) = 4. Always bracket negative bases under powers.

Functions act like brackets

sin, cos, tan, log, ln, √ — all take whatever is in their parentheses as a single grouped input. sin(30 + 5) = sin(35), not sin(30) + 5. The function's bracket counts as a parenthesis for ordering. Multiple-argument functions like nCr(n, r) work the same way: each argument is independently evaluated before the function runs.

How to debug an unexpected answer

Read the expression line above the result. If the result is wrong, check: (1) Are the brackets balanced? (2) Did you press × between adjacent factors, or did the calculator auto-multiply? (3) Are negative numbers bracketed? (4) For trig: is the angle mode right? (5) Did you press equals at the right point, or did SHIFT-something change the expression? Most order-of-operations errors trace to one of these five.

Frequently asked questions

What is the correct order of operations?

Parentheses (or brackets) first, then exponents, then multiplication and division (left to right), then addition and subtraction (left to right). The acronyms PEMDAS and BODMAS encode the same rule. Multiplication and division share the same priority; addition and subtraction share the same priority.

Is multiplication done before division?

No — they have equal priority and are evaluated left to right. So 8 ÷ 4 × 2 = 4 (do 8 ÷ 4 = 2 first, then × 2 = 4), not 1 (which would be 8 ÷ (4 × 2)). Same for addition and subtraction: 10 − 4 + 2 = 8, going left to right.

What is 6 ÷ 2(1 + 2)?

Equals 9 under standard PEMDAS/BODMAS. The expression resolves as 6 ÷ 2 × 3 = 9. The viral 'is it 9 or 1?' debate comes from inconsistent treatment of implicit multiplication. Most modern calculators give 9. To force the other interpretation, write 6 ÷ (2 × (1 + 2)).

Why does my calculator give a different answer?

Most common reasons: (1) you typed the expression in a different order than you intended; (2) the calculator uses left-to-right immediate evaluation rather than full PEMDAS (very basic four-function calculators do this); (3) implicit multiplication is being parsed differently. Switch to a calculator that shows the full expression line — the issue usually becomes obvious.

How do I force a different order of operations?

Use brackets. Anything in brackets is evaluated first, and nested brackets work inside-out. To compute (2 + 3) × 4 instead of 2 + 3 × 4, type the brackets around the 2 + 3 part. The display shows the full expression so you can verify before pressing equals.

Related calculators and guides

Scientific Calculator Fraction Calculator Percentage Calculator How to Use a Scientific Calculator (Complete Guide) DEG vs RAD vs GRAD — Which Mode and When How Factorial Works (with Worked Examples) What is e on a Calculator? (Euler's Number Explained) How to Enter Fractions on a Scientific Calculator