Quick guide
How to use this calculator
- Enter an infix expression with explicit operators.
- Use parentheses where you want to override precedence.
- Read the equivalent prefix and postfix forms and the exact evaluated check.
Calculation method
Parse structure before changing notation
The converter builds an expression tree using parentheses, unary signs, powers, multiplication or division, then addition or subtraction.
Prefix notation places each operator before its operands; postfix notation places it after them. The parser does not execute source code or use implicit multiplication.
Worked example
Convert 3 + 4 × 2
Multiplication binds first, so 4 × 2 remains a subtree beneath the addition.
Prefix: + 3 × 4 2 | Postfix: 3 4 2 × +
Supported inputs
Precision and limits
Explicit grammar
Use decimals, parentheses, unary signs, +, −, ×, ÷, and ^. Implicit multiplication is rejected.
Deterministic precedence
Powers associate right; −2^2 means −(2^2); exponents must be non-negative integers.
Complexity budgets
Expressions are limited to 500 characters, 250 tokens, 50 nesting levels, and 500 reductions.
Exact check
Accepted expressions are evaluated as exact rational values with bounded component sizes.
