The formula for constant annuity (TVM reimbursement) is :

a = PV * i / (1-(1+i)^-n)

write a program in as few possible steps to solve this equation, where you have previously entered the following variables in the stack : PV (= present value or lended amount, i (= interest (not in %, ie 6% = .06), n (number of payments

NB :
European people :
i has to be converted from the basic rate. If rate is anuual and payments are monthly, then im = 1-(1+iy)^(1/12)

American people :
the shown rate is different from the yield, but the monthly rate is calculated by dividing the annual rate by 12, so im=iy/12



Oops, I posted the message above to fast.

- the PV, n and i vlaues can be stored wherever you want
- hint : use no register (sto and rcl cost bytes !), but do use the stack. BTW, this is an excellent stack exercice.

My solution is 15 steps long, including LBL/RTN. Who give a better one ?

It could be 17 steps long with a 12C for the rollup function does not exist in the 12C (you spend 2 more bytes * 2) but the lbl and rtn funtions do not exist either (you save 2 bytes)

Amazing how fast the answer is given on a 41C (< 1sec) and on a 12C (<2.5 sec, v. <2 sec with the solver)

Enjoy !


Ok, to make up for NOT READING the earlier challenge completely (I used a numeric key), I have a 41c style solution with 13 steps, including LBL and RTN.

My inputs are n, PV, and i in the Z, Y, and X registers. I assumed that n is total number of payments and i was the periodic interest rate...if the payments are monthly then i is the monthly interest rate.

Interestingly, I have 15 step solutions for PV, n, i and PV, i, n as the input order.

LBL 01
RUP (Roll Up)

That seems to work. Anyone less than 13?


This is cheating ... a bit.

If you put -n on the stack instead of N, you can do it in 12 steps:

LBL 01

- Ed


Also 13 steps, without LBL and RTN, with n in Z, PV in Y and i in X :

Roll Down
Roll Up
Roll Up


I suggest that when such challenges are posted--and they can be quite useful--a solved example be included so that the challengees will know positively they've understood the problem and exactly what kind of problem it is they're challenged to solve. In this case I could have produced a formula but I wouldn't have known for sure that the formula was exact without a sample by which to proof my work. Thanks.


example :

You purchase a house for $500.000.
You pay it back in 15 years. Rate is 5.5/year.

Month rate is .05/12=0.42%/month. 15 years is 180 month

Key in
180 ENTER 500.000 ENTER .0042 R/S (or XEQ...)

Your should read a monthly payment of 3.964,39 per month...


Thanks for the example. Helps immensely.


I would think that the creative finance people from Enron and WorldCom could put their vast experience to use and contribute a few helpful hints under this Subject line . . .

Possibly Related Threads...
Thread Author Replies Views Last Post
  Stupid idea of the day: 41-compatible watch bhtooefr 0 360 03-31-2013, 08:23 AM
Last Post: bhtooefr
  Another stupid WP34S question Geoff Quickfall 2 424 06-16-2012, 11:21 PM
Last Post: Geoff Quickfall
  Stupid question number...WS34P Geoff Quickfall 16 1,318 06-16-2012, 07:04 AM
Last Post: Paul Dale
  Stupid question re HP-41 Sigma key... Jim L (OHIO) 5 631 07-19-2010, 06:04 PM
Last Post: BruceH
  RE: 35s sorting routine challenge - Gene's Challenge Miguel Toro 4 631 08-01-2007, 08:36 AM
Last Post: Miguel Toro
  Stupid Scammer! Ron 9 787 06-11-2005, 05:16 PM
Last Post: Nenad (Croatia)
  Stupid Question: Difference btn. 38G and 40G Maximilian Hohmann 4 517 06-11-2005, 03:05 AM
Last Post: R Lion
  May be a stupid question... Pierre Brial 10 881 07-11-2003, 05:02 PM
Last Post: unspellable
  AARRRRG! Stupid !#$@*&! HP-17BII! W. Bruce Maguire II 2 396 01-09-2002, 03:45 PM
Last Post: Ron Ross
  Stupid HP-25 Questions Tom 7 635 02-15-2001, 01:38 PM
Last Post: Tom

Forum Jump: