What is RPN?
Reverse Polish Notation (RPN) is a way of entering calculations where the numbers come first and the operation comes after. Instead of typing 3 + 4 =, you type 3 ENTER 4 +. It sounds odd at first, but it means you never need parentheses or an equals key, and complicated calculations take fewer keystrokes.
RPN was popularized by Hewlett-Packard's scientific and financial calculators starting in the 1970s, and it remains a favorite of engineers, scientists, pilots and anyone who learned on one.
How the stack works
The calculator keeps four numbers in a stack, labeled X, Y, Z and T from bottom to top. The display always shows X.
- Typing a number puts it in X.
- ENTER copies X up into Y (and pushes Y to Z, Z to T), ready for the next number.
- A two-number operation like + or × combines Y and X, puts the answer in X, and drops Z and T down one level.
- A one-number function like √x or SIN works on X alone.
- After an operation, typing a new number automatically pushes the answer up, so you can chain calculations without pressing ENTER.
Worked examples
(2 + 3) × (4 + 5)
2 ENTER 3 + gives 5. Then 4 ENTER 5 + gives 9, with 5 waiting in Y. Press × for 45. No parentheses needed.
Hypotenuse of a 3-4-5 triangle: √(3² + 4²)
3 g x², then 4 g x², +, √x → 5.
Average of 12, 15 and 18
12 ENTER 15 + 18 + 3 ÷ → 15.
Percent: 15% of 200
200 ENTER 15 g % → 30. The original 200 stays in Y, so pressing + next gives 230 (200 plus 15%).
Mean and standard deviation of 2, 4, 4, 4, 5, 5, 7, 9
Press f CLΣ to start fresh, then key each number followed by Σ+ (the display counts the entries). Then g x̄ → 5 and g s → 2.1381.
Key reference
| Key | What it does |
|---|---|
| f / g | Shift keys. f (gold) selects the function printed above a key; g (blue) selects the one on the key's front edge. |
| ENTER | Finish a number and copy it into Y. (g: LSTx recalls the value X had before the last operation) |
| x⇄y | Swap X and Y, handy for reversing a subtraction or division. (g: RND rounds X to the digits shown) |
| R↓ / R↑ | Roll the stack down, or up with g, to bring any level into view. (f: CLREG clears registers 0–9) |
| ← | Delete the last digit; when not typing, clears X. (g: CLx, f: CLST clears the whole stack) |
| CHS | Change sign. While typing an exponent, it changes the exponent's sign. (g: ABS) |
| EEX | Enter an exponent: 1.5 EEX 3 CHS is 1.5 × 10⁻³. (g: π) |
| STO n / RCL n | Store X in register 0–9, or recall it. STO + n, STO − n, STO × n and STO ÷ n do arithmetic on the register. |
| f FIX / SCI / ENG n | Display n decimal places, scientific notation, or engineering notation (exponents in steps of 3). |
| g DEG / RAD / GRD | Angle mode for trigonometry. RAD or GRAD shows in the display when active. |
| HYP / g HYP⁻¹ | Press before SIN, COS or TAN for hyperbolic functions and their inverses. |
| g % / g Δ% | % gives Y × X ÷ 100; Δ% gives the percent change from Y to X. Both leave Y in place. |
| INT / g FRAC | Integer or fractional part of X. |
| →RAD / g →DEG | Convert X between degrees and radians. |
| Σ+ / g Σ− | Add or remove X as a data point. g x̄ (on 0) and g s (on .) give mean and standard deviation; f CLΣ clears the data. |
| f x! | Factorial of X (on the 0 key). |
| RAN# | Random number between 0 and 1. |
| CLR | Clear the stack and start over (registers are kept). |
Frequently asked questions
What is an RPN calculator?
An RPN calculator uses Reverse Polish Notation: you enter the numbers first and then the operation, so there is no = key and no need for parentheses. To add 3 and 4 you press 3, ENTER, 4, +.
Why do people prefer RPN?
RPN takes fewer keystrokes for complex calculations, never needs parentheses, and shows every intermediate result, which makes it easier to spot mistakes. Many engineers, scientists and pilots learned on RPN calculators and still prefer them.
What does the ENTER key do?
ENTER finishes typing a number and copies it up the stack, so the next number you type goes into X while the first waits in Y. Pressing a number then ENTER twice in a row is a quick way to use the same value twice, for example 5 ENTER × gives 25.
What are X, Y, Z and T?
They are the four levels of the stack. X is the number on the display, Y is the one above it, then Z and T. Two-number operations like + use Y and X, put the answer in X, and move Z and T down.
Which calculators use RPN?
RPN was popularized by Hewlett-Packard, starting with the HP-35 in 1972, and is still used in several HP financial and scientific calculators. This online calculator is an independent design and is not affiliated with HP.