If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Order of operations example

The order of operations tells us the order to solve steps in expressions with more than one operation. First, we solve any operations inside of parentheses or brackets. Second, we solve any exponents. Third, we solve all multiplication and division from left to right. Fourth, we solve all addition and subtraction from left to right. Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • leaf green style avatar for user Matt
    Hello, I had two questions in regards to order of operations. 1. I was wondering where does the order of operations come from? In my limited google research :), I have found that no one really knows this, but we see it being used in history back in the 1500s or so.

    2. Is there a mathematical reason why this works? Or, does this just seem to be the historical standard or traditional way to perform equations based on history or precedence?

    Thanks!
    (225 votes)
    Default Khan Academy avatar avatar for user
  • female robot grace style avatar for user Isabela.C
    Should there be a multiplication sign between the 5 and 4?
    (54 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Raja Sutherland
    How come you didn't distribute the negative sign within the parenthesis?
    (34 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user sillymary368
      You have to take care of everything in the parentheses first: 6+10/2
      There weren't any variables inside the parentheses, so it could be simplified right to 11, and the negative sign just tells us to subtract that 11. If there were variables involved, then we would need to distribute a negative sign. However, in this case it was just straight subtraction.
      Does that help?
      (38 votes)
  • aqualine seed style avatar for user John Scheurer
    At the end, when there was 28-11+44, wouldn't you add 11 and 44 first because adding comes before subtracting?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Polina Vitić
      Nope. You do the addition and subtraction in the same step, always moving from left to right and doing the addition/subtraction in the order that you see them.

      Here we have: 28 - 11 + 44
      See how the subtraction comes first?

      You want to work through the all the addition/subtraction in left to right order.

      28 - 11 + 44
      17 + 44
      61

      (You might notice that for this problem you get the same answer either way you do it. This doesn't always happen, though, especially when you have more complicated problems.)

      Hope this helps!
      (7 votes)
  • blobby green style avatar for user fiddlefadl06
    When dividing, for example, 8^2bc-b^2? b=4 c=16 how would u do it?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Polina Vitić
      You can use PEMDAS to solve this expression:
      P = parentheses
      E = exponents
      MD = multiplication / division
      AS = addition / subtraction

      First, plug in the given values for b and c
      8²bc - b²
      b=4, c=16
      = 8²⋅4⋅16 - 4²

      P = parentheses
      There aren't any parentheses, so we can go on to the next step.

      E = exponents
      Next, calculate the exponents from left to right:
      8²⋅4⋅16 - 4²
      = 64⋅4⋅16 - 4²
      = 64⋅4⋅16 - 16

      MD = multiplication / division
      Now, going from left to right, work out any multiplication or division:
      64⋅4⋅16 - 16
      = 256⋅16 - 16
      = 4096 - 16

      AS = addition / subtraction
      Finally, do any remaining addition or subtraction in left to right order:
      4096 - 16
      = 4080

      So (given the values b=4 and c=16):
      8²bc - b² = 4080

      Hope this helps!
      (6 votes)
  • leafers ultimate style avatar for user Sahishnu
    hi ,I'm having a doubt that why we we can't follow the order of operations,why can't it be correct when we do it in some other way
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Carmen Villagomez
    So im stuck in a problem 5(2-4+1)+2/3(6)= and i know im going to end up with -5+2/3(6)= put from there i dont know how to work it out can i get some help??...
    (4 votes)
    Default Khan Academy avatar avatar for user
  • male robot johnny style avatar for user zbriones
    Hello! I have two questions with the order of operations. What if a problem has parentheses, brackets, and exponents? What is the order then?

    Thanks!
    (3 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Gong, Chelsea
      If there is both brackets and parentheses, it indicates to do them first in PEMDAS, they just added brackets so they don't have two sets of parentheses. Using the example Kim gave, [15-(3+6)^2] You would add 3+6 first which would add up to 9. Then you would do the exponent next with 9^2 then with that answer you subtract it from 15
      (3 votes)
  • piceratops tree style avatar for user Erin M
    Why does the order have to be the way it is? Why couldn't we just read it left to right? It would make more sense.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user odin.talavera
    6/2(1+2)
    Can anyone clear up this for me?
    i have two answers, 1 or 9.
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

We're asked to simplify 8 plus 5 times 4 minus, and then in parentheses, 6 plus 10 divided by 2 plus 44. Whenever you see some type of crazy expression like this where you have parentheses and addition and subtraction and division, you always want to keep the order of operations in mind. Let me write them down over here. So when you're doing order of operations, or really when you're evaluating any expression, you should have this in the front of your brain that the top priority goes to parentheses. And those are these little brackets over here, or however you want to call them. Those are the parentheses right there. That gets top priority. Then after that, you want to worry about exponents. There are no exponents in this expression, but I'll just write it down just for future reference: exponents. One way I like to think about it is parentheses always takes top priority, but then after that, we go in descending order, or I guess we should say in-- well, yeah, in descending order of how fast that computation is. When I say fast, how fast it grows. When I take something to an exponent, when I'm taking something to a power, it grows really fast. Then it grows a little bit slower or shrinks a little bit slower if I multiply or divide, so that comes next: multiply or divide. Multiplication and division comes next, and then last of all comes addition and subtraction. So these are kind of the slowest operations. This is a little bit faster. This is the fastest operation. And then the parentheses, just no matter what, always take priority. So let's apply it over here. Let me rewrite this whole expression. So it's 8 plus 5 times 4 minus, in parentheses, 6 plus 10 divided by 2 plus 44. So we're going to want to do the parentheses first. We have parentheses there and there. Now this parentheses is pretty straightforward. Well, inside the parentheses is already evaluated, so we could really just view this as 5 times 4. So let's just evaluate that right from the get go. So this is going to result in 8 plus-- and really, when you're evaluating the parentheses, if your evaluate this parentheses, you literally just get 5, and you evaluate that parentheses, you literally just get 4, and then they're next to each other, so you multiply them. So 5 times 4 is 20 minus-- let me stay consistent with the colors. Now let me write the next parenthesis right there, and then inside of it, we'd evaluate this first. Let me close the parenthesis right there. And then we have plus 44. So what is this thing right here evaluate to, this thing inside the parentheses? Well, you might be tempted to say, well, let me just go left to right. 6 plus 10 is 16 and then divide by 2 and you would get 8. But remember: order of operations. Division takes priority over addition, so you actually want to do the division first, and we could actually write it here like this. You could imagine putting some more parentheses. Let me do it in that same purple. You could imagine putting some more parentheses right here to really emphasize the fact that you're going to do the division first. So 10 divided by 2 is 5, so this will result in 6, plus 10 divided by 2, is 5. 6 plus 5. Well, we still have to evaluate this parentheses, so this results-- what's 6 plus 5? Well, that's 11. So we're left with the 20-- let me write it all down again. We're left with 8 plus 20 minus 6 plus 5, which is 11, plus 44. And now that we have everything at this level of operations, we can just go left to right. So 8 plus 20 is 28, so you can view this as 28 minus 11 plus 44. 28 minus 11-- 28 minus 10 would be 18, so this is going to be 17. It's going to be 17 plus 44. And then 17 plus 44-- I'll scroll down a little bit. 7 plus 44 would be 51, so this is going to be 61. So this is going to be equal to 61. And we're done!