Meta Calculator > Learning Labs > How to Build Scientific Calculator > Reverse Polish Notation

# What is Reverse Polish Notation ?

Reverse polish notation (rpn), sometimes referred to as postfix notation, is a way of writing mathematical expressions where each operand is preceded by the two operators it applies to and looks something like 2 5 3 + * instead of (5 + 3 ) * 2
What does this have to do with scientific calculators ?
Well, it turns out that it is easier/more efficient for computers to parse an RPN expression than an infix one. In fact, if you look at the code underlying most calculators you'd find that most of them take the infix expressions that we write and first convert them to postfix before evaluating them. Meta calculator's graphing and scientific calculators both do exactly this. If you'd like some insight into how a calculator typically would evaluate a reverse polish notation expression, try our interactive rpn calculator .

## What are some examples of RPN?

Below are some examples of rpn right next to their 'normal' ie 'infix' notation.
 Infix Version RPN Version 3 - 2 3 2 - 3 * 2+5 5 3 2 * + (12 - 3 ) /3 12 3 - 3 /
As the last example illustrates, RPN or postfix notation removes the need for parentheses! To give any operation greater precedence in RPN, just place the associated operand (- in our example) immediately to the right of the two operators (12 and 3)!

You can practice converting infix to rpn (postfix) all you want with our infix to postfix convertor.
 Tweet

### Practice Evaluating Postfix Expressions

 Postfix Value 3 11 + 3 11 5 + - 3 11 + 5 - 2 3 11 + 5 -* 9 5 3 + 2 4 ^ - +

### Practice Converting from Infix to Postfix

Ok, now that you've seen some examples, try these practice problems out!
 Infix Version RPN Version Value 5 + 2 ^3 13 3 * 2 -11 -5 2 + 1 - 12 /3 -1 ( 6 - 3) ^2 - 11 -2 6 - 3 ^2 - 11 -14 162 / (2 + 1 ) ^4 2