How the math calculator works
Type an arithmetic expression, such as 3 + 4 × (2² − 1) ÷ 2, and the calculator works it out one operation at a time, in the correct order. Each step shows the rule it uses and rewrites the expression, so you can follow exactly how the answer was reached. It is built for checking homework and learning the order of operations, rather than just getting a number.
Whole numbers and fractions stay exact, so 1/3 + 1/6 gives 1/2 rather than a long decimal; the decimal value is shown as well. Square roots and π give decimal answers.
The order of operations, step by step
Calculations are done in a fixed order, often remembered as PEMDAS: parentheses, exponents, multiplication and division, then addition and subtraction. Multiplication and division share a rank and are worked from left to right, and so are addition and subtraction.
Example: 3 + 4 × (2² − 1) ÷ 2. Inside the brackets, the exponent comes first: 2² = 4, so the brackets hold 4 − 1 = 3. Then multiplication and division from left to right: 4 × 3 = 12, then 12 ÷ 2 = 6. Last comes the addition: 3 + 6 = 9.
A common mistake is to treat "multiplication before division" as a strict rule. It is not: 12 ÷ 3 × 2 is 8, worked left to right, not 12 ÷ 6 = 2.
Fractions and exact answers
Fractions in an expression are kept as fractions. 1/2 + 3/4 × 2 works out the multiplication first, 3/4 × 2 = 3/2, then adds: 1/2 + 3/2 = 2. Keeping answers exact avoids rounding errors that build up when decimals are cut short, which matters when you are checking work by hand.