Welcome to RpnCalc

New: How does the T register work? See the manual

A full-function scientific calculator for your Android phone.

This is a basic scientific RPN calculator. It's a powerful scientific calculator with many popular features.

This is an RPN calculator. If you don't know what that means, or are not a fan of RPN, stop now; this is not the calculator for you.



Twitter Updates

Get RpnCalc news on Twitter

What's New

Version 3.1 Introduces user-control of display rounding for small numbers in FIX mode, and Portuguese translation.

Version 3.0 is a major release which switches the core math code from binary to decimal arithmatic. This eliminates certain kinds of round-off error, improves compatibility with classic HP calculators, and improves precision.

Version 2.31 introduces the dynamic ←/CLx key which changes its symbol depending on whether data entry is happening. Also added a "Rate This App" feature, accesible via the help menu.

Version 2.30 brings up the menu by tapping the display. A long press on the display brings up the copy/paste menu.

Version 2.23 adds the "tape" display (look for "Calculator Tape" on the menu, or tape somewhere on the keyboard.) which allows you to view or share a record of all your recent interactions.

Version 2.0 is now released. This is a complete re-write based on the RpnCalc Pro code base. This new version has a menu which allows you to switch between full scientific mode and basic mode (with easier to touch buttons).

Version 2.0 also features built-in help, and copy-and-paste of the X display.

Version 2.0 has improved appearance, especially on larger devices such as the Verizon Droid.

To access copy-and-paste, press and hold the X display just as you would on any Android text widget.

Introduction

In general, enter numbers using digits, ., EEX, and CHS (for change sign). Use ENTER to enter the values. See Keyboard Shortcuts, below for keyboard shortcuts.

Use the f button for shifted functions.

The calculator uses a 16-level stack. The top four levels are labeled X,Y,Z,T and are shown on the display.

There are 10 memory registers, plus some registers used for statistics. The STO and RCL buttons can access the memory registers. The buttons write to the statistics registers.

News and updates available by following @RpnCalc on Twitter.

Availability



Using RpnCalc


Contents:

An introduction to RPN

If you're already familiar with RPN, feel free to skip this section.

Some useful links:

How RPN works

In a nutshell, Reverse Polish notation means that calculator functions are performed as soon as you command them. With RPN, you enter two numbers, press +, and the addition function is executed immediately. In contrast, an algebraic calculator remembers that you pressed + and executes it later, when you press =. If you were to enter "1 + 2 × 3 =" into an algebraic calculator, the addition would not occur until the very end.

Because of RPN's "do what I say" approach, the "=" key and parenthesis keys would be superfluous. RPN calculators do have an "ENTER" key, on the other hand, to seperate one numeric entry from another.

As a practical example, let's look at the "1 + 2 × 3" example from above. Instead of entering the expression as it's written, we calculate it the way we would actually solve the problem with pencil and paper. That is, first we would multiply 2 and 3, then we would add 1.

On an RPN calculator, the process would be to first enter the value 2 with the key sequence 2 ENTER. Next, we would multiply by 3 with the sequence 3 ×. Finally, we would add 1 with the sequence 1 +.

This may all seem a little confusing to someone who is used to the algebraic style of keyboard input, but after a little use, you will come to find RPN to be a more intuitive interface.

In short, RPN works the way your brain actually works, not how you write things down on paper.

A point to ponder: algebraic calculators actually use a mixture of algebraic notation and RPN. For two-number functions, like addition, an algebraic calculator uses algebraic notation, while for one-number functions like square-root or 1/x, you find yourself using RPN. For example, an algebraic calculator computes square roots by first having you enter the number, and then pressing the key.

How would you compute √(4²+3²) on an algebraic calculator? Damned if I know, and I bet you don't know either without looking it up. Maybe it's in the manual. Either way, I guarantee it's really a mixture of algebraic and RPN unless it's an unusually fancy calculator.

(With an RPN calculator, you do it just the way you would do it on paper: compute 4², compute 3², add them together, take the square root.)

The stack

The stack is a storage area within the calculator that holds values until they can be processed. Both algebraic and RPN calculators have stacks, but RPN calculators expose the stack to the user.

By default, the stack in RpnCalc and RpnCalc Pro holds sixteen numbers. The most recent four numbers are shown on the display and known as X, Y, Z, and T, with X being the most recent.

You can set the stack size to either 4 or 16 in Preferences. If you're a fan of the T register, you might prefer the smaller stack size.

Try it: Key in a number and then press the ENTER key. See that the number you entered as X has been copied to Y. When you enter another number, it becomes the new X value. Press ENTER again. Now you'll see that Y has been moved to Z and X has been copied to Y as before.

Key in yet another number and press ENTER again. Now, the old Z value has been moved to T, Y has been moved to Z, and X has been copied to Y.

The display might now look like:

T: 123.00
Z: 456.00
Y: 789.00
789.00

If you keep entering numbers in this way, the stack will fill up with data, with the most recent data always in the X display. This process is known as "pushing" the stack, since each new value pushes the previous values deeper into the stack.

You can review the contents of the stack by pressing the R↓ key. After you've pressed this key sixteen times, the stack will be back to where it was.

Two-number functions, such as + take the most recent two numbers (X and Y) from the stack, perform the operation on them, and place the results back onto the stack as X.

Because two values were replaced by one value, the stack is then "popped", with older values making their way back to the front of the stack.

Try it: we'll re-visit the "1 + 2 × 3" problem, but this time enter the numbers in the order they appear. Since adding 1 to 2x3 is the last thing to happen, the value 1 will sit in the stack until the end.

You enterThe display showsNotes
C T: 0.00
Z: 0.00
Y: 0.00
0.00
Clear the stack
1 T: 0.00
Z: 0.00
Y: 0.00
1
X = 1
ENTER T: 0.00
Z: 0.00
Y: 1.00
1.00
X pushed to Y
2 T: 0.00
Z: 0.00
Y: 1.00
2
X = 2
ENTER T: 0.00
Z: 1.00
Y: 2.00
2.00
Stack pushed again
3 T: 0.00
Z: 1.00
Y: 2.00
3
X = 3
× T: 0.00
Z: 0.00
Y: 1.00
6.00
X receives 2×3; stack is popped.
+ T: 0.00
Z: 0.00
Y: 0.00
7.00
X receives 1+6; stack is popped.

Another example

Let's evaluate:

    3+7²
    ————
    8+5

On paper, you would first find the value 7², then for 3+7², then the value for 8+5, and then divide them. With RPN, we do the exact same thing.

You enterThe display showsNotes
3 ENTER T: 0.00
Z: 0.00
Y: 3.00
3.00
First value entered
7 T: 0.00
Z: 0.00
Y: 3.00
7
X = 7
f T: 0.00
Z: 0.00
Y: 3.00
49.00
X receives 7²
+ T: 0.00
Z: 0.00
Y: 0.00
52.00
X and Y are added
8 ENTER T: 0.00
Z: 52.00
Y: 8.00
8.00
8 entered, previous value pushed into stack.
5 + T: 0.00
Z: 0.00
Y: 52.00
13.00
X receives 8+5
÷ T: 0.00
Z: 0.00
Y: 0.00
4.00
And finally, we divide.

One last example

Let's evaluate:

    √(4²+3²)

On paper, you would first find 4², then 3², then add them together, and finally take the square root. With RPN, we do the exact same thing.

You enterThe display showsNotes
4 f T: 0.00
Z: 0.00
Y: 0.00
16.00
4² entered
3 f T: 0.00
Z: 0.00
Y: 16.00
9.00
3² entered
+ T: 0.00
Z: 0.00
Y: 0.00
25
Add
T: 0.00
Z: 0.00
Y: 0.00
5
Square root

Note that we never even used the ENTER button. The ENTER button's main purpose is to seperate two numbers that are being entered one right after the other, but that wasn't needed here.

The T register

The last register in the stack is special. If your stack size is 4, that's the T register. If your stack size is 16 it's that 16th register, which you can't see on the display. You might want to set your stack size to 4 in Preferences when reading this section.

As I mentioned above, many operations "pop" the stack, causing older values to make their way to the top. For example, the + function adds X and Y and stores the sum in X. At this point the stack "pops" up one level, with the value in Z moving to Y and the value in T moving to Z. The value in T also stays where it is so now there are two copies.

Suppose your stack looks like this (type 1 ENTER 2 ENTER 3 ENTER 4):

T: 1.00
Z: 2.00
Y: 3.00
4

Now press the + button:

T: 1.00
Z: 1.00
Y: 2.00
7.00

You can see that Z(2.00) was copied to Y and T(1.00) was copied to Z and that T still has its old value of 1.00.

(Reminder, you'll need the stack size set to 4 in Preferences unless you feel like hitting ENTER 16 times to fill the whole stack.)

Why this is useful:

Sometimes you want to perform an operation repetitively. By putting a value into the T register, you effectively fill the entire stack with a single value and keep it filled.

For example, suppose you were interested in powers of two. You might fill the stack with 2's by entering 2 ENTER ENTER ENTER

T: 2.00
Z: 2.00
Y: 2.00
2.00

Now just keep hitting the × button to your heart's content:

T: 2.00
Z: 2.00
Y: 2.00
4.00

× × × × ×

T: 2.00
Z: 2.00
Y: 2.00
128.00

A more intersting example: what's the value of a $1000 bank account over time if the annual interest rate is 5%?

First fill the stack with 1.05: 1.05 ENTER ENTER ENTER

T: 1.05
Z: 1.05
Y: 1.05
1.05

And now the initial bank account value: 1000

T: 1.05
Z: 1.05
Y: 1.05
1,000

Now just keep hitting × for each year of interest:

T: 1.05
Z: 1.05
Y: 1.05
1,050.00
T: 1.05
Z: 1.05
Y: 1.05
1,102.50
T: 1.05
Z: 1.05
Y: 1.05
1,157.63

And so forth.


Functions:

Shifted functions
fUsed to access the shifted functions (displayed in orange.) You can also access the shifted functions with a long press on the key.
Data Entry
09 .Data entry
CHSChange sign. For example, for -3, enter 3 CHS.
EEX Exponent for scientific notation. For example, key 1 . 2 EEX 9 for 1.2×109 (1.2 billion.)
Note: the CHS key can also change the sign of the exponent. For example: 1 . 2 EEX 9 CHS will enter 1.2×10-9
ENTER Enter current value, pushing it onto the stack and making the calculator ready for a new value.
Clear last keystroke during data entry; clear X register otherwise.
CClear stack
ACClear everything
REGClear registers
Last X Recall most recent X value
X↔YSwap X,Y values
R↓Rotate stack down
πPi
Math
+Add X and Y
-Subtract X from Y
×Multiply X and Y
÷Divide X into Y
MODCompute Y modulo X
√xCompute square root of X
Compute square of X
exCompute e to X power
10xCompute 10 to X power
lnCompute natural log of X
logCompute log base 10 of X
yxCompute Y to power of X
1/xCompute 1/X
SINCompute sine of X
COSCompute cosine of X
TANCompute tangent of X
ASINCompute arcsine of X
ACOSCompute arccosine of X
ATANCompute arctangent of X
INTReturn integer part of X
FRAC Return fraction part of X
x!Compute X factorial
Display and Data Modes
SHOW Show the current X value in full precision.
BIN, OCT, DEC, HEXChange base. See below for more information about hex mode.
FIX, SCI, ENG Set fixed-point, scientific, or engineering notation. Choose a display mode and enter a single-digit precision, e.g. FIX 2
See also Formatting Rule for more information on controlling display rounding for small numbers.
DEG, RAD, GRD Switch between degrees, radians, and gradians
Memory Registers
STO rEnter a digit in 0..9 to store X to a memory register. Enter . and a digit to store to registers 10-19.
Example: STO . 5 will store X in register 15.
RCL r Recall specified register
STO + r Add X to a memory register
Example: STO + 2 will add X to register 2.
STO r Subtract X from a memory register
STO × r Multiply X to a memory register
STO ÷ r Divide X into a memory register
RCL + r Add a memory register to X
Example: RCL + 2 will add register 2 to X.
RCL r Subtract a memory register from X
RCL × r Multiply a memory register to X
RCL ÷ r Divide a memory register into X
RCL ∑+ Recall specified statistics registers. This may recall one or two values, depending on the registers you choose.
Percents
% Compute X% of Y [X = X*Y*.01]
Δ% Compute percent change from Y to X [X = 100*(X-Y)/Y]
Conversions
→P Rectangular to polar; convert X,Y to R,θ
→R Polar to rectangular; convert R,θ to X,Y
→H Hours.mmss to hours
Example: How many hours is 2:20:33?
Solution: Enter 2.2033 →H
Answer: 2.34 hours
→HMS Hours to hours.mmss
Example: What is 1.8 hours in hours, minutes, seconds?
Solution: Enter 1.8 →HMS
Answer: 1:48:00
Hint: Use SHOW to see all the digits.
→RAD Degrees to radians
→D Radians to degrees
Permutations
P(x,y) Return number of permutations of X items from a population of Y
Example: How many ways to draw three marbles from a sack of 8?
Solution: Enter 3 ENTER 8 P(x,y)
Answer: 336
C(x,y) Return number of combinations of X items from a population of Y
Example: Same as above, but the order doesn't matter.
Solution: Enter 3 ENTER 8 C(x,y)
Answer: 56


Statistics

The RPN calculator can perform various statistical calculations on X and Y values. (If you don't care about the Y values, just ignore them.)

The calculator uses a few memory registers for statistics calculations. These are:

R1nthe number of values that have been entered
R2∑Xthe sum of all X values
R3∑X²the sum of all X² values
R4∑Ythe sum of all Y values
R5∑Y²the sum of all Y² values
R6∑XYthe sum of all X×Y values
Statistics Functions
c∑ Clear statistics registers to zero
∑+ Add X,Y to statistics registers
∑− Subtract X,Y from statistics registers (this is the best way to 'undo' ∑+)
x Return mean X,Y values to X,Y registers
σ Return standard deviation of X,Y
L.R. Linear Regression; return slope and intercept
y,r Linear Estimation: Compute f(X); confidence value returned in Y
x,r Linear Estimation: Compute f-1(X); confidence value returned in Y
RCL ∑+ Recall specified statistics registers. This may recall one or two values, depending on the registers you choose. For example, RCL ∑+ 2 would recall the ∑X and ∑Y registers into X and Y. (You can also recall any of R1-R6 directly, but this feature saves you the trouble of remembering which memory register is which statistics value.)
 

Keyboard Shortcuts

If your Android phone has a keyboard (such as the G1, Samsung Moment, or Motorola Droid), then keyboard keys can be used as shortcuts for certain buttons.

The digit keys, and decimal point keys on your keyboard correspond to the same buttons on the calculator. Likewise, the +, -, *, / keys represent the +, -, ×, and ÷ buttons. The E key represents EEX.

In hex mode, the A through F keys enter hex digits.

Keyboard shortcuts:
Ff
0…9 09
..
EEEX (exponent)
CCHS (change sign)
+ - * / + - × ÷
DEL
EnterENTER
XX↔Y
RRCL
SSTO

Hex Mode

When in hexadecimal (or binary or octal) mode, the meaning of a few of the buttons and keys change. In particular, you will note that the top row of buttons have been relabeled with the letters 'A' through 'F'. While in hex mode, the math functions previously associated with those buttons will not be available.

Likewise, the 'A' through 'F' keys on the keyboard will enter the corresponding hex digits.

In particular, the 'F' key is no longer available as a shortcut to the f calculator button. This will probably cause you some confusion the first few times you try to use f DEC to return to decimal mode. However, you should quickly get used to using the f button on the screen instead.


User Preferences

Menu > Preferences brings up the user preferences dialog. Preferences include:


Frequently Asked Questions