Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Evaluating Numerical Expressions with Order of Operations

Welcome. This course begins by rebuilding the quantitative habits that make later work in calculus, probability, economics, and market modelling reliable. In this first module, the emphasis is on careful arithmetic and algebra before we ask Python to do calculations for us.

This lesson establishes one essential convention: an expression is not evaluated simply from left to right. Parentheses, powers, multiplication or division, and addition or subtraction have a shared standard order. By the end, you should be able to evaluate expressions containing negative numbers, fractions, powers, and parentheses while explaining why each step comes when it does.


Why a shared order matters

Consider the expression

If someone adds first, they get . If someone multiplies first, they get . Mathematics needs expressions to have one agreed meaning, so we use an order of operations.

The useful operational version is:

  1. Simplify grouping symbols, working from the innermost outward.
  2. Evaluate powers or exponents.
  3. Perform multiplication and division, from left to right.
  4. Perform addition and subtraction, from left to right.

You may know the mnemonic PEMDAS. It is helpful only if interpreted correctly:

  • “M” and “D” are a single priority level: work left to right.
  • “A” and “S” are also a single priority level: work left to right.

So PEMDAS does not mean multiplication always comes before division, nor addition always before subtraction.

For example,

must be handled from left to right:

It would be incorrect to calculate first and then divide by . Division is not associative: changing its grouping can change the answer.

The same principle applies to addition and subtraction. Write intermediate lines rather than trying to hold every operation in your head:


Grouping symbols: instructions about scope

Parentheses are not decorative. They tell you to treat several operations as one unit.

Compare:

with

The parentheses change which quantities are multiplied.

Mathematical expressions may also use brackets and braces, usually to make nested expressions easier to read:

The rule is always the same: begin with the innermost grouping.

A fraction bar is also a grouping symbol. It says that the entire numerator is one quantity and the entire denominator is another quantity.

Order of Operations | Parentheses, Exponents, and a Fraction Bar | PEMDAS | Math with Mr. J

Watch “Order of Operations | Parentheses, Exponents, and a Fraction Bar | PEMDAS” from Math with Mr. J. It gives a compact visual demonstration of why a fraction bar groups a complete numerator and denominator, rather than merely indicating a division at one point in a line.

Watch the setup for the fraction-bar idea. Then follow the grouped parts, where the numerator and denominator are simplified separately. Finish with the left-to-right work, paying attention to the division and multiplication in the numerator before the final division.

For example, in

do not divide by . First simplify the top and bottom independently:

The final result could also be written as , but keeping preserves exactness.


Powers and negative signs: a crucial distinction

An exponent tells us how many times the base is multiplied by itself:

Parentheses determine whether a negative sign belongs to the base. This distinction is particularly important in algebra, calculus, and later when coding formulas.

Compare these two expressions:

In the first expression, the base is , because the parentheses include the negative sign. In the second, the exponent applies only to ; the negative sign is applied afterward.

A useful way to read them aloud is:

  • : “negative three, all squared”
  • : “the negative of three squared”

For a negative base in parentheses:

  • An even power produces a positive result.
  • An odd power produces a negative result.

This follows from pairing negative factors. Each pair multiplies to a positive number; with an odd number of negative factors, one negative factor remains.


Negative numbers: signs are part of the calculation

A negative number is not an unusual type of number. It follows the same order of operations as every other number. The main challenge is reading the signs accurately.

Here are the core sign facts:

Operation Result
Positive multiplied or divided by positive Positive
Negative multiplied or divided by negative Positive
Positive multiplied or divided by negative Negative
Negative multiplied or divided by positive Negative

For addition and subtraction, parentheses prevent ambiguity:

Subtracting a negative quantity adds its magnitude. In economic language, this can represent reversing a loss: a change of followed by subtracting that change has a positive effect.

Now evaluate an expression containing several features:

First handle powers:

Notice that is evaluated before the subtraction. The expression would mean , which is ; it is not unless parentheses establish that negative base.


Fractions within an expression

Fractions require two related habits:

  1. Treat the fraction bar as grouping.
  2. Apply multiplication and division from left to right.

When multiplying fractions, multiply numerator by numerator and denominator by denominator:

When dividing by a fraction, multiply by its reciprocal:

This is useful because division by asks: “how many groups of two-sevenths fit?” The reciprocal converts that division into multiplication.

Most important for the order of operations: do not treat division as having lower priority than multiplication.

Both multiplication and division have equal priority, so proceed left to right:

The next reading gives a concise reference for grouping symbols, negative bases, and left-to-right processing.

1.2: Operations with Real Numbers - Mathematics LibreTexts

Read the sections “Grouping Symbols and Exponents” and “Order of Operations” from Mathematics LibreTexts. They consolidate the notation rules behind this lesson, especially the difference between a negative base in parentheses and a leading negative sign outside a power.

In “Grouping Symbols and Exponents,” begin at the explanation of grouping symbols. Read through the examples involving fraction bars and nested parentheses. Continue in the same section from exponential notation, focusing on the comparison between (-2)^4 and -2^4. Then read the full “Order of Operations” section, beginning at four-step procedure, and follow its worked examples one line at a time.


A complete worked example

Suppose a simple index is defined by the numerical expression

Rather than scanning it all at once, identify the major structure:

  • The fraction bar separates a numerator and denominator.
  • The numerator contains parentheses, a power, multiplication, and subtraction.
  • The denominator contains a power and addition.

First simplify the parentheses in the numerator:

Substitute that result while preserving the parentheses around the negative base:

Now evaluate the powers:

Then carry out multiplication and the remaining addition or subtraction within the numerator and denominator:

Finally divide:

The answer is

Writing each transformation on a new line is not just presentation. It makes it possible to locate an error: a sign mistake, a missed exponent, or an operation performed too early.


A reliable written workflow

For expressions that initially look complicated, use this method:

  1. Locate the largest structure. Is there a fraction bar? Outer parentheses? A power applied to a whole group?
  2. Simplify grouped portions first. Work from the deepest nested parentheses outward.
  3. Evaluate powers carefully. Before calculating, identify exactly what the base is.
  4. Complete multiplication and division left to right.
  5. Complete addition and subtraction left to right.
  6. Keep exact fractions where practical. Convert to decimals only when a context requires a decimal approximation.
  7. Check signs and reasonableness. A squared quantity with parentheses around a negative base cannot be negative; a product with exactly one negative factor must be negative.

A calculator can confirm the final result, but it cannot replace reading the expression correctly. This habit will matter later when Python evaluates formulas: Python also follows precedence rules, but parentheses remain the clearest way to communicate your intended model.


Key takeaways

Order of operations gives every numerical expression a single, shared meaning:

  • Grouping symbols, including fraction bars, are handled first.
  • Powers come before multiplication, division, addition, and subtraction.
  • Multiplication and division share priority, so calculate from left to right.
  • Addition and subtraction share priority, so calculate from left to right.
  • Parentheses around a negative number matter: is not the same expression as .
  • A fraction bar groups its entire numerator and denominator.

Next, we will build on these operations by converting confidently among fractions, decimals, and percentages—the forms in which economic changes and probabilities are often reported.

Can't find a good explanation? Sign up and we'll make it for you

Sign up