HP Forums

Full Version: Time Value of Money - The Power of Compound Interest.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
// Time Value of Money - The Power of Compound Interest.
// Alex Rodriguez - 2015
// The powerful HP solver is called up to solve for any unknown variable
// This program is basically two equations linked by the "+" sign just before the "deposit" variable.
// This variable can be left with a value of 0, and the rest of the equation works just fine.
EXPORT pv, fv, %R, years, deposit, comp;
EXPORT TVM()
BEGIN
STARTAPP("Solve");
"fv=pv*(1+((%R/100)/comp))^(comp*years)+deposit*((1+((%R/100)/comp))^(comp*years)-1)/((%R/100)/comp)"▶E1;
PRINT();
PRINT("NOTE: This Program Will Solve for Any Unknown Variable.");
PRINT(" ");
PRINT("pf = Present Value");
PRINT("fv = Future Value");
PRINT("%R = Interest Rate");
PRINT("years = Numbers of Years");
PRINT("comp = Compounds per Year, 1=yearly, 12=montly, 4=quaterly, etc.");
PRINT("deposit= Payment or deposit, 0 if none.");
PRINT(" ");
PRINT("Press ENTER ↲ to Continue...");
// Display Solver
CHECK(1);
STARTVIEW(2,1);
END;
Reference URL's