Order of Operations Calculator

Learn and apply the order of operations (PEMDAS) to solve mathematical expressions. Enter any expression and see it solved step by step.

Remember: PEMDAS

P
E
M
D
A
S
Parentheses Exponents Multiplication Division Addition Subtraction

M & D have equal priority (left to right)
A & S have equal priority (left to right)

Step-by-Step Solution:

Step-by-Step Examples

Example 1: Basic PEMDAS

Expression: 3 + 4 x 2

Step 1: Multiplication first: 4 x 2 = 8
Step 2: Addition: 3 + 8 = 11
Result: 11
Example 2: With Parentheses

Expression: (3 + 4) x 2

Step 1: Parentheses first: 3 + 4 = 7
Step 2: Multiplication: 7 x 2 = 14
Result: 14
Example 3: With Exponents

Expression: 2 + 3^2 x 2

Step 1: Exponent: 3^2 = 9
Step 2: Multiplication: 9 x 2 = 18
Step 3: Addition: 2 + 18 = 20
Result: 20
Example 4: Complex Expression

Expression: 10 - 2 x (3 + 4) / 2

Step 1: Parentheses: 3 + 4 = 7
Step 2: Multiplication: 2 x 7 = 14
Step 3: Division: 14 / 2 = 7
Step 4: Subtraction: 10 - 7 = 3
Result: 3
Example 5: Left to Right Rule

Expression: 20 / 4 x 2

Note: Division and Multiplication have equal priority
Step 1: Division (left to right): 20 / 4 = 5
Step 2: Multiplication: 5 x 2 = 10
Result: 10

Understanding Order of Operations

The order of operations is a set of rules that defines the sequence in which mathematical operations should be performed in an expression.

Why PEMDAS Matters

Without a standard order of operations, the same expression could yield different results. For example, 3 + 4 x 2 could be interpreted as:

  • Without rules: (3 + 4) x 2 = 14 (incorrect)
  • With PEMDAS: 3 + (4 x 2) = 11 (correct)

Detailed Breakdown

  • P - Parentheses: Solve expressions inside parentheses ( ), brackets [ ], and braces { } first, starting from the innermost set.
  • E - Exponents: Calculate powers and roots (e.g., 2^3 = 8).
  • MD - Multiplication & Division: Work from left to right. These operations have equal priority.
  • AS - Addition & Subtraction: Work from left to right. These operations have equal priority.

Memory Tips

Remember PEMDAS with these mnemonics:

  • "Please Excuse My Dear Aunt Sally"
  • "Penguins Eat Many Dark Ants Salad"