Order of Operations

If you have an expression that has adds, subtracts, multiplies, divides, exponents and square roots and (maybe) parentheses, then this is the order that you do them in:
  1. Things inside parentheses "( )" first ...
  2. Exponents and square roots next (if you have any)
  3. Multiplies and divides next ...
  4. Adds and subtracts last
Example:


Evaluate for a = 3, b = 6, h = 8:

    (a + b h) - b / 2

First, let's put in the numbers:

    (3 + 6 x 8) - 6 / 2

Now, we do the things inside
the parentheses, and within
the parentheses, we do the multiply first:

    (3 + 48) - 6 / 2

Finishing up the things inside
the parentheses and then
removing them, we get:
    51 - 6/2

Next, we do the divide and
then subtract:
    51 - 3 = 48

Notice that if you do the operations
left-to-right, ignoring the order rules,
you get a different (wrong) answer:
    3 + 6 x 8 - 6 / 2 =
    9 x 8 - 6 / 2 =
    72 - 6 / 2 = 66/2 = 33