PEMDAS Calculator: Order of Operations Step by Step
By FindMySum · Last reviewed
This order of operations calculator solves an arithmetic expression the way American students are taught with PEMDAS: first anything in parentheses, then exponents, then multiplication and division from left to right, and finally addition and subtraction from left to right. It shows each step with the rule that applies, so you can check homework or see where a hand calculation went wrong, and it works in exact fractions, so 1/3 + 1/6 comes out as exactly 1/2.
Worked example: 3 + 6 × (5 + 4) ÷ 3 − 7
The US page starts with the expression 3 + 6 × (5 + 4) ÷ 3 − 7, with the steps named in PEMDAS terms.
- Parentheses: 5 + 4 = 9, giving 3 + 6 × 9 ÷ 3 − 7.
- Multiplication and division, left to right: 6 × 9 = 54, then 54 ÷ 3 = 18, giving 3 + 18 − 7.
- Addition and subtraction, left to right: 3 + 18 = 21, then 21 − 7 = 14.
The answer is 14, in 5 steps counting each operation once. Try 8 ÷ 2 × (3 + 1)^2 and the calculator works the parentheses, then the exponent (16), then 8 ÷ 2 = 4 and 4 × 16 = 64.
PEMDAS, BEDMAS and BODMAS
Canada teaches the same rule as BEDMAS (Brackets, Exponents, Division and Multiplication, Addition and Subtraction) and the UK, India and Australia as BODMAS or BIDMAS, where O means "orders" or "of". They all give the same answers; only the names and the order the paired letters are written in differ. The calculator lets you choose which name to show.
Tricky cases
Negative numbers and exponents: −3² means −(3²) = −9, because the exponent applies before the negation; write (−3)² for 9. Powers stack from the top down, so 2^3^2 is 2^9 = 512. Implied multiplication, such as 6 ÷ 2(1 + 2), is treated as ordinary multiplication here, which gives 9; some textbooks and calculators give implied multiplication a higher priority and get 1, which is why such expressions go viral online. When you write expressions for others, add parentheses so there's only one reading.
Spreadsheets and programming languages follow the same order with two catches worth knowing. In Excel and Google Sheets, negation comes before exponents, so =-3^2 returns 9, not -9. And in most languages ^ is not a power at all (Python uses **), so check the syntax before you trust a formula. A graphing calculator such as a TI-84 follows PEMDAS but treats implied multiplication its own way, which is another reason to add parentheses.
For BEDMAS naming as taught in Canadian schools, use the order of operations calculator.
Sources
This article explains how the calculator works and is general information, not financial, tax or legal advice. Rules change; check the sources above or a qualified professional before you act.