Hi Spegg,
I'm not so familiar VB and scripts so I recreated your scenario using InfoPath 2007 & C#. I did a quick sample form with the following code and it does work. Your formula looks good... I'm just not completely sure if the result I'm getting is correct since I have no sample calculations to compare with.
Here's the code:
double Amount;
double Percentage;
double Payments;
double Mortgage;
XPathNavigator root = MainDataSource.CreateNavigator();
Amount = double.Parse(root.SelectSingleNode("/my:myFields/my:Amount", NamespaceManager).Value);
Percentage = double.Parse(root.SelectSingleNode("/my:myFields/my:Percentage", NamespaceManager).Value);
Payments = double.Parse(root.SelectSingleNode("/my:myFields/my:Payments", NamespaceManager).Value);
Mortgage = Amount * (Percentage * Math.Pow(1+Percentage, Payments))/(Math.Pow(1+Percentage,Payments-1));
root.SelectSingleNode("/my:myFields/my:Result", NamespaceManager).SetValue(Mortgage.ToString());
Hope you find this useful.
Jett