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 review

The order of operations are a set of rules for how to evaluate expressions. They make sure everyone gets to the same answer. Many people memorize the order of operations as PEMDAS (parentheses, exponents, multiplication/division, and addition/subtraction).
The order of operations are one set of agreements for how to evaluate expressions. They make sure everyone gets to the same value.
start color #543b78, start text, G, end text, end color #543b78rouping: We evaluate what's inside grouping symbols first, before anything else. For example, 2, times, start color #543b78, left parenthesis, 3, plus, 1, right parenthesis, end color #543b78, equals, 2, times, 4, equals, 8.
Two common types of grouping symbols are parentheses and the fraction bar.
start color #0c7f99, start text, E, end text, end color #0c7f99xponents: We evaluate exponents before multiplying, dividing, adding, or subtracting. For example, 2, times, start color #0c7f99, 3, squared, end color #0c7f99, equals, 2, times, 9, equals, 18.
start color #9e034e, start text, M, end text, end color #9e034eultiplication and start color #9e034e, start text, D, end text, end color #9e034eivision: We multiply and divide before we add or subtract. For example, 1, plus, start color #9e034e, 4, divided by, 2, end color #9e034e, equals, 1, plus, 2, equals, 3.
start color #a75a05, start text, A, end text, end color #a75a05ddition and start color #a75a05, start text, S, end text, end color #a75a05ubtraction: Lastly, we add and subtract.
Many people memorize the order of operations as start color #7854ab, start text, G, end text, end color #7854ab, start color #0c7f99, start text, E, end text, end color #0c7f99, left parenthesis, start color #9e034e, start text, M, D, end text, end color #9e034e, right parenthesis, left parenthesis, start color #a75a05, start text, A, S, end text, end color #a75a05, right parenthesis (pronounced as it's spelled), where the "G" is for grouping, the "E" is for exponents, and so on.
Important note: When we have more than one of the same type of operation, we work from left to right. This can matter when subtraction or division are on the left side of your expression, like 4, minus, 2, plus, 3 or 4, divided by, 2, times, 3 (see example 3 below to understand why this matters).

Example 1

Evaluate 6, times, 4, plus, 2, times, 3.
There are no parentheses or exponents, so we jump straight to multiplication and division.
empty space, 6, times, 4, plus, 2, times, 3{}
equals, start color #9e034e, 6, times, 4, end color #9e034e, plus, 2, times, 3Multiply start color #9e034e, 6, end color #9e034e and start color #9e034e, 4, end color #9e034e.
equals, 24, plus, start color #9e034e, 2, times, 3, end color #9e034eMultiply start color #9e034e, 2, end color #9e034e and start color #9e034e, 3, end color #9e034e.
equals, start color #a75a05, 24, plus, 6, end color #a75a05Add start color #a75a05, 24, end color #a75a05 and start color #a75a05, 6, end color #a75a05.
equals, 30... and we're done!
Notice: We took care of all multiplication before doing the addition. If we had done 24, plus, 2 before multiplying 2, times, 3, we would have gotten the wrong answer.

Example 2

Evaluate 6, squared, minus, 2, left parenthesis, 5, plus, 1, plus, 3, right parenthesis.
empty space, 6, squared, minus, 2, left parenthesis, 5, plus, 1, plus, 3, right parenthesis{}
equals, 6, squared, minus, 2, left parenthesis, start color #543b78, 5, plus, 1, plus, 3, end color #543b78, right parenthesisAdd start color #543b78, 5, plus, 1, plus, 3, end color #543b78 inside the parentheses first.
equals, start color #0c7f99, 6, end color #0c7f99, start superscript, start color #0c7f99, 2, end color #0c7f99, end superscript, minus, 2, left parenthesis, 9, right parenthesisFind start color #0c7f99, 6, squared, end color #0c7f99, which is 6, dot, 6, equals, 36.
equals, 36, minus, start color #9e034e, 2, left parenthesis, 9, right parenthesis, end color #9e034eMultiply start color #9e034e, 2, end color #9e034e and start color #9e034e, 9, end color #9e034e.
equals, start color #a75a05, 36, minus, 18, end color #a75a05Subtract 18 from 36.
equals, 18... and we're done!

Example 3

Evaluate 7, minus, 2, plus, 3.
One correct way to do this is to work from left to right.
CorrectIncorrect
72+3=5+3=8\begin{aligned}&7-2+3\\\\=&5+3\\\\=&8\end{aligned}72+3=75=2\begin{aligned}&7-2+3\\\\=&7-5\\\\=&2\end{aligned}
Remember: Even though "A" comes before "S" in GE(MD)(AS), that doesn't mean we need to add before we subtract. Addition and subtraction are at the same "level" in the order of operations. The same is true of multiplication and division.
Want to learn more about order of operations? Check out this video.

Practice

Problem 1
2, plus, 12, divided by, 2, times, 3, equals
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text

Want to practice more problems like these? Check out this introductory exercise and these more challenging exercises: exercise one and exercise two.

Want to join the conversation?

  • hopper cool style avatar for user Mihai Nishiike
    Is there another way to say PEMDAS?( it could be another word) I really don't like the sound of it...
    (3 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seed style avatar for user dana davis
    what if its 25^10x12(50+12)
    (9 votes)
    Default Khan Academy avatar avatar for user
    • winston default style avatar for user Kim
      I think you have to use a calculator.
      First calculate (50+12). And calculate 25^10 with your calculator. Then we only have multiplication symbols. So, just calculate from left to right with your calculator.
      (12 votes)
  • mr pink orange style avatar for user Abigail Ng
    What is the best way to solve a quotation with a exponent when the exponent is 3 or above? For example if the exponent of the number 2 is 3, should I do 2 times 2 which is 4 and then do 4 times 2 which equals 8 again? How am I suppose to do that with bigger exponents?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • blobby blue style avatar for user Lisa Bui
    apparently it's now PEDMAS my teacher told me that, I'm not quite sure though. I'm just a little confused weather its PEDMAS or PEMDAS but I guess it wouldn't really matter
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user jonew
    87747873483-8374574+95848498658386484=
    (5 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user amendez9544
    : Deal with what's in the parentheses first. While working inside the parentheses, follow PEMDAS as well. So -(2^2+6)... first, I'm going to assume the "+6" is not part of the exponent. It's hard to tell with the way it is typed.
    There are no more parentheses so inside the one set, we'll move to "E". 2^2 becomes 4. Now our expression looks like:
    -(4+6)
    There are no multiplication or division inside the parentheses so we'll move on the AS: 4+6 = 10 so now the expression looks like:
    -(10…
    (8 votes)
    Default Khan Academy avatar avatar for user
  • mr pink red style avatar for user vikash parmar
    i am canadian I do bedmas
    (8 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seed style avatar for user alquijay, madison
    I don't understand when there is division then straight up multiplacation
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user calkinw01
    Brevhbjrfdubjbukvrdukbffj kdkdif fdvjk
    (5 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Elaina163
      Im guessing your saying that out of spite-. Order of operations, an easy way to remember is the acronym PEMDAS. This stands for parenthesese, exponents, multiplication, division, add, and subtract. It goes in the order its presented, hoever in some cases for example multiplication and division, you just go from left to right, whichever multiplication/division sign is first gets to be answered first. The same goes for adding and subtracting. An example equation is, 4^2(4*3/2)+6-2. First you would solve the expression inside the parentheses, which is 4*3/2. Now since the multiplication part of this expression (imagine if i said equation, rhyming hehehe) is first because it is lefter to the division part. (please never quote me on the word "lefter") 4*3 is equal to 12, and 12 divided by 2 is equal to 6. Now that we solved that the equation should look like this 4^2*12+6-2. Now the next part is exponents, dont you just love those exponents, i know i dont :> OK 4*4 is equal to 16, and after that we have this, 16*12+6-2. As we learned from before multiplication goes before both addition and subtraction according to the PEMDAS order. This means we do 12*16 first before adding 6 and subtracting 2. This would equal 192, now we add the 6 and then subtract the two, because the adding is more to the left then the subtracting. That would be 198, then 196. Hope that answers your frustrationnnn
      (0 votes)
  • duskpin seedling style avatar for user kirbs3499
    I am not understanding the order of operations challenge
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby blue style avatar for user Skylar
      Here is the Order:
      P = Parenthesis
      E = Exponents
      M/D = Multiplication/Division. They are the same level so if they are both in a problem just solve it left to right.
      A/S = Addition/Subtraction. These are also the same level so you also just solve this left to right.

      Here is an example problem: 7 x 14 ÷ (5 + 3 - 1)²

      First, we need to solve the equation in the Parenthesis. That would be 5 + 3 - 1. According to the operations, since addition and subtraction, you would just solve left to right. If there was multiplication or division though, you would do that first then move on to addition and subtraction. You would just repeat the order of operations in the parenthesis. Anyway, that would turn the equation in 7.

      So now the problem is 7 x 14 ÷ (7)²

      Next is exponents. The exponent powers the 7, turning it into 49. If you don't now exponents it is just the base (the big number; in this case 7) times itself the exponent (the little number; in this case 2) times. So in this case it would be 7 x 7, which is how I got 49.

      The problem is now 7 x 14 ÷ 49.

      This is simple, just like the addition and subtraction earlier, you would just solve it left to right, because they are at the same level. 7 x 14 = 98, and then 98 / 49 = 2.

      So the equation, 7 x 14 ÷ (5 + 3 - 1)², equals 2.


      Hope that helped a bit.
      (5 votes)