Math calculators

Order Of Operations Calculator

Updated Sep 5, 2026 By Jehan Wadia
Rate Formulas

Enter Your Expression

    Works with + − × ÷ ^ √ r (nth root) % and ( ) [ ] { }. Implicit multiplication such as 3(2+1) is detected automatically.
    Expression interpreted as:
    Implicit multiplication is written out and every bracket type is unified as parentheses.

    Math Keypad

    Special operations
    Numbers & operators

    Practice Type & Examples

    Expression complexity (practice type)
    Try an Example (click to load it into the input)
    Final Answer
    Step-by-Step Solution (PEMDAS / BODMAS)
    Number Line

    Check Your Answer

    Whole numbers, decimals, negatives, fractions (3/4) and percents (25%) are accepted.
    Answer keypad

    Introduction

    The Order of Operations Calculator solves math problems in the right order and shows you every step. Type an expression like (3 + 4) × 2² − 6 ÷ 3, press Calculate, and you get the answer plus each step listed in order.

    Order of operations is the rule that tells you what to do first in a math problem. Most people learn it as PEMDAS or BODMAS: parentheses (or brackets) first, then exponents (or orders), then multiplication and division from left to right, then addition and subtraction from left to right. If you skip this rule, you get the wrong answer.

    This tool works with plus, minus, times, divide, powers, square roots, nth roots, percents, and all three bracket types: ( ), [ ], and { }. It also spots implicit multiplication, so 3(2+1) works just fine. Each step is labeled, so you can see exactly which rule was used and why.

    You can also pick a practice level, load an example problem, and use the "Check Your Answer" box to test your own work first. The number line at the end shows where your answer sits, which helps with negative numbers and decimals. Students can check homework with it, and teachers can put the steps on screen.

    How to use our Order of Operations Calculator

    Type a math problem into the box, press Calculate, and the tool shows the final answer plus every PEMDAS step in order.

    Math expression: Type your problem in the big box. You can use + − × ÷ ^ for powers, √ for square roots, r for other roots, % for percent, and ( ) [ ] { } for groups. Writing 3(2+1) works too. The "Expression interpreted as" line shows how the calculator reads your problem, so you can spot mistakes early.

    Math keypad: Click the keys to add numbers, operators, roots, powers, and brackets without typing. Use "Full Pad" for all keys, "Compact Pad" for fewer, and Hide Keypad to close it. ⌫ deletes one character and AC clears everything.

    Practice type: Pick how hard you want the math to be, from simple two-step problems to multi-step problems with parentheses and exponents. This changes the list of sample problems below it.

    Try an example: Click any sample problem to drop it straight into the input box. Click "Show More Examples" to see the rest.

    Calculate button: Press it (or hit Enter) to solve. You get the final answer, a step-by-step PEMDAS solution with each operation highlighted, and a number line that plots the result. Press Reset to start over with the default problem.

    Your answer (Check Your Answer): Type the answer you got on your own, then click Check. Whole numbers, decimals, negatives, fractions like 3/4, and percents like 25% all work. The tool tells you if you are right or gives you the correct answer.

    What Is the Order of Operations?

    The order of operations is a set of rules that tells you which part of a math problem to solve first. Without these rules, one expression could give many different answers. With them, everyone who solves 3 + 4 × 2 gets the same answer: 11, not 14.

    PEMDAS and BODMAS

    Most students learn the rules with a short word. In the United States it is PEMDAS. In many other countries it is BODMAS or BIDMAS. They all mean the same thing.

    • P / B (Parentheses or Brackets): solve anything inside ( ), [ ], or { } first. Start with the innermost group.
    • E / O / I (Exponents, Orders, or Indices): powers and roots come next, like 2³ or √16.
    • MD (Multiplication and Division): do these together, moving from left to right.
    • AS (Addition and Subtraction): do these last, also from left to right.

    Left to Right Matters

    Multiplication does not beat division, and addition does not beat subtraction. They are equal partners. When you see both, work from left to right. For example, 12 ÷ 3 × 2 equals 8, because you divide first (it comes first), then multiply.

    A Worked Example

    Solve (3 + 4) × 2² − 6 ÷ 3:

    1. Parentheses: 3 + 4 = 7, so the problem is 7 × 2² − 6 ÷ 3
    2. Exponent: 2² = 4, so it becomes 7 × 4 − 6 ÷ 3
    3. Multiply and divide, left to right: 7 × 4 = 28 and 6 ÷ 3 = 2, giving 28 − 2
    4. Subtract: 28 − 2 = 26

    Common Mistakes to Avoid

    • Adding too soon. In 2 + 3 × 5, you must multiply first. The answer is 17, not 25.
    • Doing all multiplication before all division. Work left to right instead.
    • Forgetting hidden multiplication. 3(2 + 1) means 3 × (2 + 1).
    • Missing a negative sign. −3² means −(3 × 3) = −9, while (−3)² = 9.
    • Skipping the inner group. In [4 + {3 − 1} × 5], solve {3 − 1} before anything else.

    Why It Is Useful

    Order of operations shows up far past homework. It runs inside spreadsheets, computer code, calculators, science formulas, and money math like interest and discounts. Learning the steps now makes algebra much easier later, because equations follow the exact same rules.


    Formulas used

    Order of operations (PEMDAS/BODMAS) evaluation order
    \text{P} \rightarrow \text{E/R} \rightarrow \text{M},\text{D}\ (\text{left to right}) \rightarrow \text{A},\text{S}\ (\text{left to right})
    Exponentiation (right-associative)
    a^{b}
    Square root
    \sqrt{b} = b^{1/2}
    nth root (a r n)
    a \mathbin{\mathrm{r}} n = \sqrt[n]{a} = a^{1/n}
    Odd root of a negative number
    a^{1/n} = -\left(-a\right)^{1/n},\quad a<0,\ n\ \text{odd}
    Percent to decimal
    a\% = \frac{a}{100}
    Basic arithmetic operations
    a+b,\quad a-b,\quad a \times b,\quad a \div b = \frac{a}{b},\ b \neq 0
    Decimal to fraction (continued fractions convergent)
    x \approx \frac{h_k}{k_k},\quad h_k = a_k h_{k-1} + h_{k-2},\quad k_k = a_k k_{k-1} + k_{k-2}

    Frequently asked questions

    What is the answer to 8 ÷ 2(2+2)?

    Using standard PEMDAS rules, the answer is 16.

    1. Parentheses: 2 + 2 = 4, so you have 8 ÷ 2(4)
    2. Hidden multiplication counts as normal multiplication: 8 ÷ 2 × 4
    3. Divide and multiply left to right: 8 ÷ 2 = 4, then 4 × 4 = 16

    Some people get 1 because they treat 2(4) as one glued-together unit and multiply before dividing. That is why problems like this go viral. The fix is to write it clearly, like (8 ÷ 2) × 4 or 8 ÷ (2 × 4).

    How do you remember the order of operations?

    Most students use the sentence Please Excuse My Dear Aunt Sally. Each first letter matches a step:

    • Please = Parentheses
    • Excuse = Exponents
    • My Dear = Multiply and Divide
    • Aunt Sally = Add and Subtract

    One warning: the sentence makes it look like six steps, but it is really four. Multiply and divide are one step done left to right, and add and subtract are one step done left to right.

    What is GEMDAS and how is it different from PEMDAS?

    GEMDAS stands for Grouping, Exponents, Multiply/Divide, Add/Subtract. It is the same rule as PEMDAS, just with a better first letter.

    "Grouping" covers more than round parentheses. It includes square brackets [ ], curly braces { }, the fraction bar, and everything under a square root sign. Teachers use GEMDAS so students remember that all of those act like parentheses.

    Where do square roots fit in the order of operations?

    Roots go with exponents, in the second step. That is because a root is just a fractional power: √16 is the same as 161/2.

    The root sign also works as a grouping symbol. In √(9 + 16), you add inside first to get √25 = 5. You do not take √9 and √16 separately, which would wrongly give 3 + 4 = 7.

    How do you solve stacked exponents like 2^3^2?

    Stacked powers are solved from the top down, which means right to left.

    • 2^3^2 means 2^(3^2)
    • 3² = 9
    • 2⁹ = 512

    Working left to right would give 8² = 64, which is wrong. Exponents are the one operation that does not follow the left-to-right rule.

    Does a fraction bar count as parentheses?

    Yes. A fraction bar groups everything above it and everything below it.

    For example, in (4 + 2) over (1 + 2), you solve the top to get 6 and the bottom to get 3, then divide: 6 ÷ 3 = 2.

    When you type a fraction on one line, you must add the parentheses yourself. Typing 4 + 2 ÷ 1 + 2 gives 8, not 2.

    Do you solve parentheses first if there is an exponent outside them?

    Yes. Parentheses always come before the power.

    In (2 + 3)², you add first to get 5, then square it: 5² = 25.

    A common mistake is squaring each number inside, like 2² + 3² = 13. That is wrong. Finish the group, then apply the exponent to the single value you got.

    Where does a percent go in the order of operations?

    A percent sign is part of the number, so you change it to a decimal before doing any other math. Just divide by 100.

    Example: 20% × (30 + 70)

    1. Parentheses: 30 + 70 = 100
    2. Percent: 20% = 0.20
    3. Multiply: 0.20 × 100 = 20

    Does the order of operations work the same in algebra?

    Yes, the rules never change. Letters follow the same order as numbers.

    To find 3x² + 5 when x = 4:

    1. Exponent first: 4² = 16
    2. Multiply: 3 × 16 = 48
    3. Add: 48 + 5 = 53

    Also remember 3x means 3 × x, so the multiplication is hidden but still there.

    Why do people get different answers to the same math problem online?

    Almost always because the problem is written in a fuzzy way. Three things cause most fights:

    • The ÷ sign, which does not show how far the division reaches
    • Hidden multiplication like 2(3), which some people treat as one unit
    • Missing parentheses around the top or bottom of a fraction

    The math itself is not in doubt. Add parentheses and everyone gets the same answer.

    Do brackets inside brackets get solved from the inside out?

    Yes. Always start with the innermost group and work your way out.

    For [4 + {3 − (1 + 2)} × 5]:

    1. Innermost: 1 + 2 = 3
    2. Next group: 3 − 3 = 0
    3. Multiply: 0 × 5 = 0
    4. Add: 4 + 0 = 4

    The shape of the bracket does not matter. Square brackets and curly braces mean the same thing as round parentheses.