Order of operations (math)

In mathematics, an equation containing numerous operations should be evaluated in the following order:

1. Any operation within parentheses (or brackets) is performed first (from the most interior to the most exterior),
2. Then any operation containing an exponent (also called an order) is performed following,
3. Then multiplication and division following, and
4. Finally addition and subtraction.

In the event of multiple operations on the same level, the precedence is left to right.

The methodology is commonly referred to by the acronym PEMDAS and by the mnemonic "Please Excuse My Dear Aunt Sally".