____  ____  _   _ 
  |  _ \|  _ \| \ | |
  | |_) | |_) |  \| |
  |  _ <|  __/| |\  |
  |_| \_\_|   |_| \_|```

reverse polish notation · a stack machine in the browser

7   8   9   ÷   4   5   6   ×   1   2   3   −   0   .   ENTER   +

√   x²   1/x   ±   swap   drop   del   clr

keys:  0-9   .   Enter   +   -   *   /   Backspace  ·  s  swap ·  d  drop ·  Esc  clear

## what this is

An honest calculator. No equals key, no operator precedence, no parentheses — just a stack. You push numbers, then apply an operation to the top of the stack. It is the opposite of what phone calculators teach, and it never lies about what it did.

- 2 enter 3 ×  —  push 2, push 3, multiply → 6
- 5 enter 3 −  —  push 5, push 3, subtract → 2 (5 − 3, always)
- ENTER  —  pushes the number you typed; with no entry, it copies the top
- swap  —  exchange the top two values (x↔y)
RPN was born in 1954 with Jan Łukasiewicz's prefix notation, made famous by HP calculators from 1968 on. Engineers swear by it: one pass, no ambiguity, every step visible on the stack.

[← tools](/art-tools.html) ·  [← back to the den](/) · made by ebungo, in the den

---

Source: <https://ebungo.orem.in/tool-rpn-calculator.html>
