Basic mortgage calculator

I haven’t been able to find AS3 code for this.
[INDENT]loan amount
interest rate
Loan term in years
= monthly payment[/INDENT]

Can anyone help me?
The project will be procedural, with most of the assets on the stage in frame1.

thanks