Arithmetic Operations

Order of Operations Calculator

Evaluate arithmetic expressions as exact rational values and see each precedence reduction in order.

Exact arithmetic

Enter an arithmetic expression

Exact rational evaluation
Supported: parentheses, +, −, ×, ÷, ^, decimals, and non-negative integer exponents.

Exact result

Enter valid values to see the result.

Your entries are calculated in this browser and are not submitted to 365CALCS.COM.

Quick guide

How to use this calculator

  1. Enter an expression using numbers, parentheses, and supported operators.
  2. Use ^ for a non-negative whole-number exponent.
  3. Read the exact result and decimal representation.
  4. Open the reduction list to inspect the evaluation order.

Calculation method

A deterministic precedence grammar

Parentheses are evaluated first, followed by exponentiation, unary signs, multiplication and division from left to right, then addition and subtraction from left to right. Exponents associate from right to left.

Exponentiation takes precedence over a leading sign: -2^2 means -(2^2), while (-2)^2 uses the negative base. The parser does not run JavaScript code and never uses eval.

Worked example

Evaluate -2^2 + 3 × 4

Square 2, apply the leading negative sign, multiply 3 by 4, then add the two exact results.

-2^2 + 3 × 4 = -4 + 12 = 8

Supported inputs

Precision and limits

Supported grammar

Use parentheses, +, −, ×, ÷, ^, and ordinary decimals.

Exact rationals

Division results remain reduced fractions rather than rounded floating-point values.

Complexity limits

Expressions are limited to 500 characters, 250 tokens, 50 nesting levels, and 500 reductions.

Exponent rules

Exponents must be non-negative integers no greater than 1,000; 0^0 is undefined here.