standarddeviationcalculator.net

Updated Free · runs in your browser

Order of operations calculator

--- --- Methodology

Type an expression and this order of operations calculator evaluates it one operation at a time, in the order PEMDAS or BODMAS requires, and writes out the expression after every step. Use + − × ÷ (or * and /), ^ for powers and parentheses for grouping. Nothing is evaluated by guessing: the parser reads the expression, and the steps are the working you would write by hand.

Use + − × ÷ (or * /), ^ for powers and ( ) for grouping. Up to 200 characters.

Result 14
Expression8 + 2 × (7 − 4)^2 ÷ 3
Operations performed5
Show the working, step by step
  1. Start with the expression. The order is parentheses, exponents, multiplication and division from left to right, then addition and subtraction from left to right.

    8 + 2 × (7 − 4)^2 ÷ 3

  2. Inside the parentheses: Subtract. 7 − 4 = 3

    8 + 2 × 3^2 ÷ 3

  3. Exponent. 3^2 = 9

    8 + 2 × 9 ÷ 3

  4. Multiply. 2 × 9 = 18

    8 + 18 ÷ 3

  5. Divide. 18 ÷ 3 = 6

    8 + 6

  6. Add. 8 + 6 = 14

    14

Intermediate results are rounded to 12 significant figures. Multiplication and division share one level and are done left to right, as are addition and subtraction.

The rules, in order

  1. Parentheses (brackets). Do the innermost pair first, using these same rules inside it.
  2. Exponents (orders). Powers. For stacked powers such as 2^3^2, work from the top down.
  3. Multiplication and division, equal rank, from left to right.
  4. Addition and subtraction, equal rank, from left to right.

“Equal rank” is the rule most often misapplied. In 20 − 5 + 3 you subtract first, because it is on the left, to get 15 + 3 = 18. Adding first would give 20 − 8 = 12, which is wrong. Likewise 12 ÷ 3 × 2 = 8, not 2.

Worked example: 8 + 2 × (7 − 4)^2 ÷ 3

  1. Parentheses: 7 − 4 = 3, giving 8 + 2 × 3^2 ÷ 3.
  2. Exponent: 3^2 = 9, giving 8 + 2 × 9 ÷ 3.
  3. Multiply (leftmost of × and ÷): 2 × 9 = 18, giving 8 + 18 ÷ 3.
  4. Divide: 18 ÷ 3 = 6, giving 8 + 6.
  5. Add: 8 + 6 = 14.

An expression with a negative inside the brackets: 3 + 4 × 2 ÷ (1 − 5)^2

The brackets give 1 − 5 = −4, and (−4)^2 = 16. Then 4 × 2 = 8, 8 ÷ 16 = 0.5, and 3 + 0.5 = 3.5.

Negative numbers and exponents

A minus sign in front of a power applies after the power: −3^2 = −(3^2) = −9. To square a negative number, bracket it: (−3)^2 = 9. A minus directly after another operator, as in 2 × −3, is read as a negative number, giving −6. For the sign rules themselves, see the integer calculator.

Common mistakes

  • Doing multiplication before division (or addition before subtraction) because of the letter order. They share a rank and go left to right.
  • Adding before multiplying. 2 + 3 × 4 is 14, not 20.
  • Distributing an exponent over a sum. (2 + 3)^2 = 25, not 2^2 + 3^2 = 13.
  • Ignoring the sign on a power. −2^2 = −4 and (−2)^2 = 4.
  • Reading implied multiplication differently from a teacher. 6 ÷ 2(1 + 2) is treated here as 6 ÷ 2 × (1 + 2) = 9. Add brackets if you mean something else.

Once an expression contains letters, move on to the simplify expression calculator, which applies the same order to algebra. For roots and squares as a standalone step, use the square root calculator.

Order of operations calculator: the worked example on this page, with its result and chart
Order of operations calculator: the worked example above, at a glance.

Common questions

What is the order of operations?

Brackets (parentheses) first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. The memory aids are PEMDAS in the US (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction) and BODMAS in the UK and India (Brackets, Orders, Division, Multiplication, Addition, Subtraction). They describe the same rules.

Is multiplication done before division in PEMDAS?

No. Multiplication and division have equal rank, and so do addition and subtraction. Work through each level from left to right: 12 ÷ 3 × 2 is 4 × 2 = 8, not 12 ÷ 6 = 2. The order of the letters in PEMDAS or BODMAS is only a memory aid.

Is −3² equal to 9 or −9?

It is −9. The exponent binds tighter than the minus sign, so −3² means −(3²). If the base is the negative number, write brackets: (−3)² = 9. The calculator reads −3^2 as −9 and (−3)^2 as 9, and shows the exponent step.

What is 6 ÷ 2(1 + 2)?

The calculator gives 9. It treats 2(1 + 2) as 2 × (1 + 2) and then works left to right: 6 ÷ 2 = 3, and 3 × 3 = 9. Some textbooks give implied multiplication a higher rank, which would give 1, so the expression is ambiguous as written. Add brackets, such as 6 ÷ (2(1 + 2)), to make your meaning clear.

How do exponents and nested brackets work together?

Start with the innermost brackets and work outward, applying the full order of operations inside each pair. For 2^3^2 the exponents are stacked and are evaluated from the top: 3² = 9 first, then 2⁹ = 512. The calculator accepts up to 30 levels of nesting and up to 200 characters.