Multiply your result by

(1 + (interestRatePerYear / 12))

And your numbers will match.

The reason for this is that the Microsoft.VisualBasic.Financial.Pmt method can calculate the interest BEFORE the payment or AFTER the payment is made each month. As you have described it the Due parameter (the last one) is 0. 0 tells the Pmt method to calculate interest before the payment, and a 1 tells the Pmt method to calculate the payment before the interest.

So, your formula is fine if you are making your payment at the start of the month, but if you are paying at the end (and interest has accrued), then you need to multiple your result by (1 + (interestRatePerYear / 12)). (The actual math is a little more complex, but if you expanded the whole amortization formula, you would find that it all works out nice and neat in the end!)

(1 + (interestRatePerYear / 12))

And your numbers will match.

The reason for this is that the Microsoft.VisualBasic.Fina

So, your formula is fine if you are making your payment at the start of the month, but if you are paying at the end (and interest has accrued), then you need to multiple your result by (1 + (interestRatePerYear / 12)). (The actual math is a little more complex, but if you expanded the whole amortization formula, you would find that it all works out nice and neat in the end!)