Arithmetic Operations

Polish Notation Converter

Parse an explicit arithmetic expression and convert its structure into both prefix and postfix notation.

Exact arithmetic

Convert an infix expression

Prefix + Reverse Polish notation
Use explicit operators: +, −, ×, ÷, ^, unary signs, and parentheses.

Exact evaluated 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 infix expression with explicit operators.
  2. Use parentheses where you want to override precedence.
  3. 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.