Numeravo

Numeravo

Smart calculators

← Student calculators

Student calculator

Order of Operations Calculator

Enter an expression. The calculator evaluates parentheses, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right, and lists each step.

Order of operations

Show the steps

The example is 18 ÷ 3 × 2 + 4^2. Use parentheses, + − × ÷ or / * , ^, and sqrt(9) or √9.

Result

Value

28

  1. 18 ÷ 3 × 2 + 4^2
  2. 18 ÷ 3 × 2 + 16
  3. 6 × 2 + 16
  4. 12 + 16
  5. 28

A leading minus stays outside the exponent. -3^2 is -9. (-3)^2 is 9.

How it works

Parentheses group an expression first. Exponents are next, and a tower of exponents is evaluated from the top down: 2^3^2 means 2^(3^2), which is 512. Multiplication and division are one step and run left to right, so 18 ÷ 3 × 2 is 12, not 3. Addition and subtraction also run left to right, so 8 − 3 + 2 is 7, not 3.

A minus sign written before a number is not automatically inside the exponent. -3^2 means -(3^2), which is -9. (-3)^2 means the opposite of 3 is squared, which is 9. Write parentheses when the base includes the sign. Juxtaposition such as 2(3) is rejected, because it can be read in more than one way.

Division by zero, 0^0, and the square root of a negative number are rejected. sqrt(9) and √9 are the principal square root, 3. A root that is not an exact rational is rejected instead of approximated. Square feet for a building project stay on the construction calculators; this page only evaluates the expression you type.

Formulas

The same expression can take different values when the grouping changes. These are the conventions this page uses.

  • 18 ÷ 3 × 2 + 4^2 = 6 × 2 + 16 = 28
  • -3^2 = -(3^2) = -9, and (-3)^2 = 9
  • 2^3^2 = 2^(3^2) = 512
  • √9 = 3, and division by zero is undefined

Worked examples

  1. Example: 18 ÷ 3 × 2 + 4^2 = 28

    The exponent is 16. Then 18 ÷ 3 is 6, 6 × 2 is 12, and 12 + 16 is 28. Doing the multiplication before the division would give a different number, and this page does not do that.

  2. Example: -3^2 = -9 and (-3)^2 = 9

    Without parentheses the minus stays outside the exponent. With parentheses, -3 is the base.

FAQ

Does multiplication come before division?

No. Multiplication and division are done together, from left to right. 8 ÷ 4 × 2 is 2 × 2, which is 4. It is not 8 ÷ 8.

Why is -3^2 equal to -9?

The exponent applies only to the 3. The minus is applied after that, so the value is the opposite of 9. (-3)^2 includes the minus in the base and equals 9.

How is 2^3^2 evaluated?

Exponents are evaluated from the top down, which is right to left. 2^3^2 is 2^(3^2), or 2^9, which is 512. It is not (2^3)^2.

What does the square root button return?

sqrt(9) and √9 return 3, the principal nonnegative root. A negative radicand is rejected. A root that is not an exact fraction, such as √2, is rejected rather than rounded.

Sources