Q: How do you calculate 6/2(1+2) or 48/2(9+3)? What’s the deal with this orders of operation business?

Mathematician: Now that the Physicist and I have answered questions like these ones at least 9 times via email, I figure we should get this horrible topic out of the way once and for all with a short post.

The “order of operations” tells us the sequence in which we should carry out mathematical operations. It is merely a matter of convention (not a matter of right or wrong), giving us a standardized way to decide whether 6/2*3 is (6/2)*3 or 6/(2*3). The convention has been accepted just so that when different people see an equation they can agree on its meaning, even if they hate each other’s guts. You could come up with a different convention, but why bother? Let other people waste their time coming up with arbitrary conventions so that you can merely waste time reading posts about them.

The rules to follow are:

1. Things in parenthesis get computed before things not in parenthesis (this is because of the (little known fact) that parentheses kick ass).

2. Then, exponents get dealt with (including roots). Hence a^b*c = (a^b)*c.

3. Next, multiplication and division get carried out from left to right. So a*b/c*d is ((a*b)/c)*d. Note that division can be thought of as still carrying out a multiplication since a/b = a*(1/b), so it makes a certain sense that neither division nor multiplication takes precedence over one another.

4. Finally, additions and subtractions get carried out from left to right. Subtraction can be thought of as being like addition since a – b = a + (-b) so it makes sense that subtraction is treated on an equal footing with addition.

People sometimes use the expressions PEMDAS, “Please Excuse My Dear Aunt Sally” or “Puke Exhaust Mud Dolls Autumn Sasquatch” to remember these rules. These all stand for “Parenthesis, Exponents, Multiplication and Division, Addition and Subtraction”. It is easy to get confused by these mnemonics though because they don’t capture the fact that multiplication is treated the same way as division (carried out left to right), and addition is treated the same way as subtraction (carried out left to right). That’s why I prefer: “Puke Exhaust Mud And Dolls Autumn And Sasquatch”

One interesting thing to note about the order of operations is that there is nothing interesting about them whatsoever. But that implies there is something interesting about them. This is a contradiction, and hence the order of operations form a paradox. They are also about as fun as getting to watch a fish crawl up the stairs as a reward for answering math questions.

But, that won’t stop me from giving an example. Consider:


Without a convention, it has many possible interpretations, such as




which could be horribly confusing for people trying to communicate with each other. But, the correct interpretation according to the rules mentioned above, is:


When in doubt about what the orders of operation are for an expression, there is a simple solution which works even better than tattooing PEMDAS to your face. Just paste the expression into the google search bar and hit “search”. For instance, if I paste in:


it gives back

(((4^2) * 3) / 6) + 1 – 5 = 4. 

Not only is this the correct answer, but it shows you explicitely the order of operations that were used, so it’s useful for learning.

Google even gets this one right:

4^2*3/6 + 1 – 5/14*3 + 6/10 – 4*2/14*6^3/18 + 14

which is the kind of question little sisters give you when they are old enough to finally sort of get what a mathematician is.

It’s important to note that not all calculators handle the order of operations in the standard way. Why? Because people who make calculators hate children. The preceding sentence was not intended to be a factual statement.

Also, a lot of programming languages use the standard order of operation rules, but then you have exceptions like Smalltalk.

Oh, and in case you were wondering:

a^b^c  = a^{b^c}.

This entry was posted in -- By the Mathematician, Conventions, Math. Bookmark the permalink.

261 Responses to Q: How do you calculate 6/2(1+2) or 48/2(9+3)? What’s the deal with this orders of operation business?

  1. Pedro says:

    Also, according to this

    is not the same 6/2(2 + 1)=1 and 6⁄2(2 + 1) = 9

  2. Mathman says:

    That’s fine if you ONLY follow order of operations and ignore every other principle that was discussed, such as algebra, coefficients, product of factors, quantities, etc.

  3. Larry Scott says:

    A bit of non-science
    There are numerous threads on numerous blogs re: 6 ÷ 2(1+2) = ?
    I always distribute 2(1+2) which = 6, of course. And 6 ÷ (6) = 1. And have seen much concurrence on that.
    On most of the blogs there is no shortage of good and bad math. Including, that with or without symbolic variables versus numbers it’s reduced differently. And “my calculator returns …” as ‘proof’. And the bad math is too often supported by insistence, anger, and disrespect.
    Over the past several months I’ve asked, in person, many people is it =1?, or =9?
    Everyone that I’ve encountered in person supports =1.
    Online is the only place I’ve seen any insistence for =9. And also Excel, which requires verbose syntax.
    1/2π is one divided by the product, not one half pi.

  4. Larry Scott says:

    In a physics textbook, UC Berkeley, Nobel laureate Dr Richard Feynman describes the inverse proportion to 2√N. And writes that as 1/2√N. Expressly returning one over the product of two times sq root of N. And specifically NOT one half sq root N.

    Feynman physics lectures, UC Berkeley press
    Section 6-7. (Page 64 of the online version.)

    Six over two(one plus two).

  5. Pedro says:

    Software documentation

    Implicit Multiplication and Parsing Modes
    The evaluation of short/implicit multiplication, without any multiplication sign (ex. “5x”, “5(2+3)”), differs depending on the parsing mode. In the conventional mode implicit multiplication does not differ from explicit multiplication (“12/2(1+2) = 12/2*3 = 18”, “5x/5y = 5*x/5*y = xy”). In the
    “parse implicit multiplication first” mode, implicit multiplication is parsed before explicit multiplication (“12/2(1+2) = 12/(2*3) = 2”, “5x/5y = (5*x)/(5*y) = x/y”). The default adaptive mode works as the “parse implicit multiplication first” mode, unless spaces are found (“1/5x = 1/(5*x)”, but “1/5 x = (1/5)*x”).

  6. matt grove says:

    The original is poorly written because of how computers were originally programed with their limited capacities to work math problems.
    You changed the equation.

    Please try and argue that there is some immutable law of mathematics that makes those two equal, because what made those two equal is how computers read math problems and not the rules of mathematics. In computer programing if that equation needed to be programed in, then it would have to be entered specifically as 6/(2*(1+2)) so the computer would properly understand what was being asked.

    ab/cd = (ab)/(cd) != ab/c*d

    The only thing that has changed is how computers read the equations, not the rules on how people should read equations.

    You get 9 putting it into a computer because it is poorly formated to get the computer to answer the question being asked. Junk in = Junk out.

    Had a programing teacher predict this day, when people would forget the proper rule of mathematics because of how the computer solves equations like this one. Seems you are pretty poor “experts”.

  7. John says:

    2(2+1)/6= 1 , therefore 2(2+1)=6 , not 2/3 . 6 over 2(2+1) = 6/6 . 6 over 2/3=9

  8. Beth Herman says:

    Math is a total lie. The truth of this equation is the correct answer. The fact that it requires a universal effort to see the problem the same way or you don’t get the same answer is proof of the lie.

  9. Micheal Thomas says:

    @Beth Herman, that is just a cop-out answer. Everything we do in life is defined by a set grouping of rules. Language, biology, chemistry, driving, walking down the street, what you do at work. Same with mathematics. The arithmetic we do daily has a certain set of rules in place that define how it works. The truth with this problem, is that we are now calling out how computers are designed to answer problems versus how people have been intuitively (or being taught) to solve them in the past. For those that have been through the era of not having a calculator for everything, the 2(1+2) is telling me that it is a part of the same “item” and needs to be kept together (in the denominator of the system), thus I would get the (2+4) which makes the answer 1.
    Personally, I read this equation as 6/(2*(1+2)). If it was written as 6/2*(1+2), I would read that as (6/2)*(1+2), two seperate items being multiplied together, and I would get the 9 as an answer.

    So yes, this is all semantics, but a sort of arguement that brings to light the differences between the different experiences people have had when learning how to process these equations, and what should be done about correcting these issues.

  10. Larry Scott says:

    Yes, =1.

    2(a+b) is a denominator. But that’s coming into conflict with the current Excel style math that is taught. On this site alone there have been obstinate dismissal of 2(1+2) as a quantity. And across the internet the argument is so uncivilized.

    Apparently x(a+b) = (xa+xb) is no longer the zeitgeist. Although it is still the distribution identity. And distribution is called for.

  11. Larry Scott says:

    And, one over two pi is 1/2π.
    But that too has been distorted to:
    1/2π = one half pi.

    Go figure.

Comments are closed.