The Museum of HP Calculators

HP Articles Forum

[Return to the Index ]
[ Previous | Next ]

Multiple Period Percentage Change Program for the 30b

Posted by Mark Harman on 25 May 2011, 12:13 a.m.

Hello everyone,

Previously, I posted a program that add a top-level shifted percentage change function to the 30b while using the RPN stack.

I decided that this was not enough. If amounts change over multiple periods, discounting or compounding take place. The best way to solve this dilemma is to incorporate this into a brand new program.

Here it goes:

SH% (put this on line zero to assign the program to this key combination)
Roll down
(you can add a message like delta (the symbol) % or Pct chng here if you want)

The way this program works is such:

Say you had $50 two years ago and you have $90 today. You want to know what the percentage increase is over these two years:

50 input 90 input 2 SH% (SH is shift hold)

You should get an answer of 34.16

Now say you have the opposite situation and want to know the percentage decrease.

90 input 50 input 2 SH%

You should get an answer of -25.46440

Keep in mind that if you have only one period, you MUST enter a 1 for the third argument - otherwise you will get an error. This program requires three arguments to work.

(Now, if your logic works such that you prefer to have the new amount first, then get rid of the swap command and then enter the new first, old second, and # periods third.)

Hope this helps anyone who doesn't like going through the %Calc menu to get to this function.


[ Return to the Message Index ]

Go back to the main exhibit hall