Home › Calculators › Order of Operations Calculator

Order of Operations Calculator

Type an arithmetic expression and get the answer with every step in PEMDAS order: brackets first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. Fractions and decimals stay exact, so 0.1 + 0.2 really is 0.3.

Last updated:

Use + − × ÷ (or * /), ^ for powers, brackets ( ) [ ] { }, decimals and fractions like 3/4. A number next to a bracket means multiply.

Enter your values to see the result.
Advertisement
Advertisement

How to use the Order of Operations Calculator

  1. Type or paste the expression, for example 3 + 4 × 2 ÷ (1 − 5)^2. You can use * and / instead of × and ÷.
  2. Pick the acronym you learned (PEMDAS, BODMAS or BIDMAS). It only changes the names of the steps, not the answer.
  3. Choose fractions or decimals for numbers that are not whole.
  4. Press Solve (the answer also updates as you type).
  5. Read the steps: each line shows the operation done and the expression that remains, with the new value highlighted.

The order of operations rule

StepPEMDASBODMASWhat you doExample
1ParenthesesBracketsWork out the innermost brackets first, then the next layer out2 × (3 + 4) = 2 × 7
2ExponentsOrdersPowers and roots, from right to left when stacked5 + 2^3 = 5 + 8
3Multiplication & DivisionDivision & MultiplicationEqual priority: go from left to right12 ÷ 3 × 2 = 4 × 2 = 8
4Addition & SubtractionAddition & SubtractionEqual priority: go from left to right10 − 4 + 3 = 6 + 3 = 9

A worked example: 3 + 4 × 2 ÷ (1 − 5)^2. The bracket comes first: 1 − 5 = −4. Then the exponent: (−4)^2 = 16. Multiplication and division go left to right: 4 × 2 = 8, then 8 ÷ 16 = 1/2. Finally the addition: 3 + 1/2 = 7/2 = 3.5.

Common mistakes the steps help you catch

ExpressionCorrectCommon wrong answerWhy
8 − 3 + 273Subtraction is not done after addition; go left to right: 5 + 2
12 ÷ 4 × 391Division and multiplication share a level; left to right: 3 × 3
−4^2−1616The exponent applies to 4 only; write (−4)^2 to square −4
2^3^251264Stacked powers go right to left: 2^9
10 − (2 + 3)511The minus applies to the whole bracket: 10 − 5
1 ÷ 2 ÷ 21/41Left to right: (1 ÷ 2) ÷ 2, not 1 ÷ (2 ÷ 2)

Tips for typing expressions

  • Use * or × for multiplication, / or ÷ for division and ^ or ** for powers.
  • Square brackets [ ] and braces { } work exactly like parentheses and make nested expressions easier to read.
  • A number written right next to a bracket, as in 4(2 + 1) or (1 + 1)(2 + 3), means multiply. The calculator tells you when it found one, because textbooks do not all agree on how strongly implied multiplication binds.
  • Square roots are powers: write √9 as 9^(1/2). Perfect roots stay exact, so 8^(2/3) = 4.
  • Write large numbers without commas (1500, not 1,500) and use a dot as the decimal point.

Frequently asked questions

What is the order of operations?

It is the agreed order for evaluating an expression: first anything inside parentheses or brackets, then exponents (powers and roots), then multiplication and division from left to right, and finally addition and subtraction from left to right. PEMDAS, BODMAS and BIDMAS are memory aids for the same rule.

Does multiplication come before division in PEMDAS?

No. Multiplication and division have the same priority and are done together from left to right, whichever comes first. The same goes for addition and subtraction. So 12 ÷ 3 × 2 = 4 × 2 = 8, not 12 ÷ 6 = 2.

What is the answer to 6 ÷ 2(1 + 2)?

Using the standard rule, where a number next to brackets is ordinary multiplication done left to right with division, the answer is 9: 6 ÷ 2 × 3 = 3 × 3 = 9. Some older texts treat implied multiplication as stronger and get 1. The expression is ambiguous, so it is better to write 6 ÷ (2(1 + 2)) or (6 ÷ 2)(1 + 2).

Why is −3^2 equal to −9?

Exponents are applied before the negative sign, so −3^2 means −(3^2) = −9. If you want to square negative three, put it in brackets: (−3)^2 = 9. This calculator follows that convention, which is the one used by math textbooks and most calculators.

How are stacked exponents like 2^3^2 evaluated?

Powers are evaluated from right to left (top down), so 2^3^2 = 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64. Use brackets if you mean the second one.

Is PEMDAS the same as BODMAS?

Yes. PEMDAS (Parentheses, Exponents, Multiplication/Division, Addition/Subtraction) is used in the US, BODMAS (Brackets, Orders, Division/Multiplication, Addition/Subtraction) in the UK, India and Australia, and BIDMAS or BEDMAS in other places. All of them give the same answer.

Can I use fractions and decimals?

Yes. Write a fraction as 3/4. Because division is done in order, wrap a fraction in brackets when it follows a division or a power, for example 2 ÷ (3/4). The calculator keeps exact fractions internally, so there are no rounding errors, and shows the decimal value too.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Fraction CalculatorAdd, subtract, multiply and divide fractions with steps.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Algebra CalculatorSimplify, expand and factor algebraic expressions with exact answers and step-by-step working.Online CalculatorFree basic and scientific calculator with keyboard support, memory keys and a history tape.24 GameCombine four numbers with + − × ÷ to make 24. Endless solvable hands, timer and a solver.Math Equation Guess GameNerdle-style math puzzle: find the hidden 8-character equation in six tries. Daily and unlimited.Percentage CalculatorWork out percentages, increases and decreases.Percentage Change CalculatorPercent increase or decrease between two values, and reverse.Percentage Difference CalculatorFind the percent difference between two values, with the formula.Ratio CalculatorSimplify, solve and scale ratios with step-by-step working.Proportion CalculatorSolve A/B = C/D for x with cross multiplication steps.Scientific CalculatorTrig, logs, powers and more in your browser.Multiplication Table GeneratorPrintable multiplication charts up to 30 × 30, single tables and practice sheets.Times Tables PracticeTimed times tables drills with a number pad, streaks and an accuracy heatmap.Fraction VisualizerInteractive fraction circles and bars: equivalents, comparing, adding and simplifying.Number Line GeneratorDraw number lines with any range, fractions or decimals, points, jumps and inequalities.Significant Figures CalculatorCount sig figs, round to any number of significant figures and do arithmetic with sig fig rules.Scientific Notation ConverterConvert numbers to and from scientific, engineering and E-notation, with exact digits and SI prefixes.Caffeine CalculatorAdd up daily caffeine, compare it with 400 mg and see how much is left at bedtime.Percent Error CalculatorPercent error between experimental and theoretical values, for one result or several trials.Rounding CalculatorRound to decimal places, significant figures or the nearest 10, 100 or 0.5, any rule.Long Division CalculatorDivide with quotient, remainder, decimals and a step-by-step long division layout.Cube Root CalculatorFind cube roots and nth roots, check perfect cubes and simplify radicals.2-Stroke Oil Mix CalculatorHow much 2-stroke oil to add to gas for 50:1, 40:1, 32:1 and more, in fl oz or ml.Math Worksheet GeneratorCreate printable addition, subtraction, multiplication and division worksheets with answer keys.Simplify Fractions CalculatorReduce any fraction to lowest terms with GCD steps, mixed number, decimal and equivalents.Complex Number CalculatorAdd, subtract, multiply, divide complex numbers; polar form, modulus, argument, powers and roots.Big Number CalculatorExact + − × ÷ mod and powers for huge integers with hundreds of digits, plus digit count.Three-Phase Power CalculatorkW, kVA and kVAR from volts, amps and power factor, or three-phase current from kW or kVA.Compression Ratio CalculatorStatic engine compression ratio from bore, stroke, chamber, gasket, deck and piston volume.Expanded Form CalculatorWrite any number or decimal in expanded form, word form and a place value chart.Mixed Number CalculatorAdd, subtract, multiply and divide mixed numbers, or convert improper fractions, with steps.Nth Root CalculatorAny root of any number: real nth root, simplified radical and all complex roots.Long Multiplication CalculatorMultiply whole numbers or decimals with the column method shown digit by digit.Matrix Multiplication CalculatorMultiply matrices up to 8×8 with every dot product shown, exact fractions and a size check.Virtual Base Ten BlocksDrag ones, rods, flats and cubes onto a place value mat to model regrouping, addition and subtraction.Compare Fractions CalculatorCompare two or more fractions with <, > or = and put them in order, with steps.Equivalent Fractions CalculatorList equivalent fractions, check if two are equal, or find a missing number, with bars.Paper Tape CalculatorAdding machine calculator with a running paper tape: edit entries, subtotals, notes, print or export.Pi Digits CalculatorCalculate π to up to 100,000 digits, find any number or your birthday in pi, and download it.PSAT Score CalculatorEstimate your PSAT/NMSQT section scores, total score and National Merit Selection Index.Rational Expressions CalculatorSimplify, add, subtract, multiply and divide rational expressions with excluded values.Rationalize the Denominator CalculatorRemove square roots and cube roots from a denominator, with conjugates and full steps.Reverse Percentage CalculatorFind the original value before a percentage increase or decrease, or the whole from a part.Riemann Sum CalculatorLeft, right, midpoint and trapezoid sums of f(x) on [a, b] with a table and rectangle graph.Sum CalculatorPaste any list or column of numbers to get the total, count, average, min and max instantly.Unit Rate CalculatorFind the unit rate (per 1) from two quantities, compare rates and see the steps.Map Scale CalculatorConvert map distance to real distance and back for scales like 1:24,000 or 1 in = 1 mi.Math Formulas Cheat SheetSearchable algebra, geometry, trig, calculus and statistics formulas with a printable sheet.Number Properties CalculatorIs it prime, perfect, square, triangular or Fibonacci? See every property of a number.
See all 46 Arithmetic & Number Calculators →