The Math Forum

Ask Dr. Math: FAQ

  Order of Operations  

Dr. Math FAQ || Classic Problems || Formulas || Search Dr. Math || Dr. Math Home

What is the correct order of operations? Why use it? What is PEMDAS?

The order of operations in which one is to interpret a mathematical expression such as "2+3 * 5" is a convention. This means that a long time ago, people just decided on an order in which operations should be performed. It has nothing to do with magic or logic. Some people decided to adopt a way, and it has stuck ever since. It just makes communication a lot easier.

Another way of saying this is that rather than being inherent in the structure of mathematics, the concept of "order of operations" is a matter of mathematical notation. Order of operations refers to which operations should be performed in what order, but it's just convention. The notation tells you which operations to do first, not something about the underlying mathematics.

To remember the conventional order of operations, you can think of

  (You might remember this as "Please excuse my dear Aunt Sally.")1

  1. Parentheses
  2. Exponents
  3. Multiplication and Division
  4. Addition and Subtraction

This means that you should do what is possible within parentheses first, then exponents, then multiplication and division (from left to right), and then addition and subtraction (from left to right). If parentheses are enclosed within other parentheses, work from the inside out.

1Some people are taught to remember BEDMAS:
        Division and Multiplication, left to right
        Addition and Subtraction, left to right

Here are two examples:

    3 + 5 x 7 = ?
    3 + 5 x 7 = 3 + 35 = 38

    (1 + 3) x (8 - 4) = ?
    (1 + 3) x (8 - 4) = 4 x 4 = 16

Logs, trig functions, and expressions involving e

In questions where order of operations must be considered, logs, trig functions, and expressions involving e are all treated as functions. This means that you have to evaluate them (turn them into numbers) before you can multiply, divide, add, or subtract. Before you can evaluate 6*f(4), you need to know the value of f(4) so that you can get a number for an answer. To get a number for an answer, you can only perform operations on numbers, so you have to evaluate all functions before you do anything with them.


  1. 6log(100)*e^0. While you might wonder whether you should multiply or do the log and exponents first, you can't really do anything until you change "log(100)" and "e^0"into numbers. You have to know that log(100) = 2 and e^0 = 1 before you can multiply anything by 6. After that, you can see that 6log(100)*e^0 = 6 * 2 *1 = 12.

  2. 3Cos(pi) (2^2 + 1)^2 = 3 * (-1) * 5^2 = 3 * (-1) * 25 = -75. There is no way to get to the answer -75 without first evaluating Cos(pi).

The main thing that must be true in a notational system is consistency: when you use conventional notation you don't just start from the left and chug through, but you use the traditional order of operations. If you were to use another notational system, you would stick to that just as strictly.

The best reason for using conventional order of operations is the flexibility it gives you in writing down mathematical expressions. Remember that the operations of addition and multiplication are commutative, that is, they give you the same result no matter what order you write them in: 2*3 = 3*2. In conventional notation, that property is clearly reflected, and you get lots of options for how you want to write your expressions: 2*3+5 = 3*2+5 = 5+2*3 = 5+3*2 = 11. In calculator-order however, you only get the first two examples, 2*3+5 and 3*2+5, since in calculator-order notation the third example evaluates to 21, and the fourth evaluates to 16.

For more on different notation systems, see Order of Operations in Equations from the Dr. Math archives. To read an excellent discussion of a confusing question, see Mathematica Expressions vs. English; Calculators.

More from the Dr. Math Archives:

On the Web:

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. Math ®
© 1994- The Math Forum at NCTM. All rights reserved.