Quick guide
How to use this calculator
- Enter an expression using numbers, parentheses, and supported operators.
- Use ^ for a non-negative whole-number exponent.
- Read the exact result and decimal representation.
- 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.
