Evaluate a restricted arithmetic expression with parentheses and normal operator precedence.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
A recursive-descent parser handles parentheses, addition, subtraction, multiplication, division, and right-associative exponentiation. It consumes the complete string and rejects leftover characters or malformed operators.
(2 + 3) * 4 - 6 / 2
17
Arithmetic checks evaluate formulas, teaching examples demonstrate precedence, and local previews compute restricted numeric expressions.