Meta Calculator > Learning Labs > How to Build Scientific Calculator > Online RPN Calculator
Meta Calculator

Reverse Polish Notation Calculator

This interactive online RPN calculator is meant to help you understand how RPN works in a calculator by illustrating how easy it is to use a stack to implement RPN. You can also download the Java source code here that has an RPN parser method. (Note the source code does not construct the front end of a scientific calculator, which is the easy part; instead, the code supports RPN parsing and also converting infix to postfix, the 2 more challenging parts of making a scientific calculator that supports the order of operations)

Enter a number or type an operand:
Stack Was
empty
Stack Now
empty


Animation of Stack and RPN Calculations

The animation below shows you how a calculator would use a stack to store and evaluate the following rpn expression : 5 4 6 + /


The animation below walks you though an example of improper RPN syntax.