Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Order of operations calculator

Type an expression and see it worked out one step at a time, in PEMDAS order: parentheses, exponents, multiplication and division, then addition and subtraction.

Implied multiplication works too: 2(3 + 4) means 2 × (3 + 4).

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Need sin, logs or roots too? Use the scientific calculator. Solving for x instead? Try the equation solver.

The order of operations (PEMDAS)

  1. Parentheses (brackets): work out the innermost ones first.
  2. Exponents: powers and roots. A stack of powers goes from the top down, so 2^3^2 = 2^9.
  3. Multiplication and Division, together, from left to right.
  4. Addition and Subtraction, together, from left to right.

BODMAS and BEDMAS are the same rules with different names (Brackets, Orders or Exponents). The key point people miss is the pairs: multiplication doesn't come before division, and addition doesn't come before subtraction. Whichever comes first, reading left to right, goes first.

10 − 4 − 3 = 6 − 3 = 3 (not 10 − 1 = 9)
8 ÷ 4 × 2 = 2 × 2 = 4 (not 8 ÷ 8 = 1)
−3^2 = −(3^2) = −9, but (−3)^2 = 9

Worked example

2 × (3 + 4) − 8 ÷ 4:

  1. Parentheses: 3 + 4 = 7, giving 2 × 7 − 8 ÷ 4.
  2. Multiply and divide, left to right: 2 × 7 = 14, then 8 ÷ 4 = 2, giving 14 − 2.
  3. Subtract: 14 − 2 = 12.

What about 6 ÷ 2(1 + 2)?

Following PEMDAS strictly, the brackets give 3, then 6 ÷ 2 × 3 is done left to right: 3 × 3 = 9. Some people and some calculators treat implied multiplication, like 2(3), as binding tighter than ÷, which gives 6 ÷ 6 = 1. Both conventions exist, which is why the expression is ambiguous. Writing (6 ÷ 2)(1 + 2) or 6 ÷ (2(1 + 2)) removes the doubt. This calculator uses strict left to right and flags the case.

Limitations

  • Fractions stay exact: 1/3 + 1/6 is shown as 1/2, not 0.4999…. Roots and fractional powers, like 2^0.5, are shown as decimals.
  • Only + − × ÷ ^ and brackets are supported. For sin, log and the rest, use the scientific calculator.
  • A minus sign in front of a number is applied after exponents, as in algebra and Python: −3^2 = −9.

More examples and the reasons behind the rules are in the order of operations guide.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • 2 + 3 × 4 = 14 ✓
  • 2 × (3 + 4) − 8 ÷ 4 = 12 ✓
  • 6 ÷ 2(1 + 2) = 9 with strict left-to-right PEMDAS ✓
  • −3^2 = −9 (the exponent comes before the minus sign) ✓
  • (−3)^2 = 9 ✓
  • 2^3^2 = 2^9 = 512 (powers stack from the top down) ✓
  • 10 − 4 − 3 = 3 (left to right) ✓
  • 1/3 + 1/6 = 1/2 exactly ✓
  • Edge: 8 ÷ (4 − 4) is division by zero ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking cookies, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the correct order of operations?

Parentheses, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right (PEMDAS).

Does multiplication come before division?

No. They have the same rank and are done in the order they appear, left to right. 8 ÷ 4 × 2 = 4.

What is 6 ÷ 2(1 + 2)?

9 under strict PEMDAS: 6 ÷ 2 × 3, left to right. Some conventions give implied multiplication priority, which gives 1. Add brackets to make your meaning clear.

Is −3² equal to 9 or −9?

−9. The exponent applies to 3 first, then the minus sign: −(3²). To square −3, write (−3)², which is 9.

What's the difference between PEMDAS and BODMAS?

Nothing in the math. PEMDAS is used in the US; BODMAS (Brackets, Orders, Division/Multiplication, Addition/Subtraction) in the UK and elsewhere.

Related calculators