# Order of operations

## Performing order of mathematical operations / From Wikipedia, the free encyclopedia

#### Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about Order of operations?

Summarize this article for a 10 year old

In mathematics and computer programming, the **order of operations** is a collection of rules that reflect conventions about which operations to perform first in order to evaluate a given mathematical expression.

These rules are formalized with a ranking of the operations. The rank of an operation is called its **precedence**, and an operation with a *higher* precedence is performed before operations with *lower* precedence. Calculators generally perform operations with the same precedence from left to right,^{[1]} but some programming languages and calculators adopt different conventions.

For example, multiplication is granted a higher precedence than addition, and it has been this way since the introduction of modern algebraic notation.^{[2]}^{[3]} Thus, in the expression 1 + 2 × 3, the multiplication is performed before addition, and the expression has the value 1 + (2 × 3) = 7, and not (1 + 2) × 3 = 9. When exponents were introduced in the 16th and 17th centuries, they were given precedence over both addition and multiplication and placed as a superscript to the right of their base.^{[2]} Thus 3 + 5^{2} = 28 and 3 × 5^{2} = 75.

These conventions exist to avoid notational ambiguity while allowing notation to remain brief.^{[4]} Where it is desired to override the precedence conventions, or even simply to emphasize them, parentheses ( ) can be used. For example, (2 + 3) × 4 = 20 forces addition to precede multiplication, while (3 + 5)^{2} = 64 forces addition to precede exponentiation. If multiple pairs of parentheses are required in a mathematical expression (such as in the case of nested parentheses), the parentheses may be replaced by brackets or braces to avoid confusion, as in [2 × (3 + 4)] − 5 = 9.

These rules are meaningful only when the usual notation (called infix notation) is used. When functional or Polish notation are used for all operations, the order of operations results from the notation itself.