Debarati - 4 months ago 110

Java Question

I want to implement PMT function (from Excel) in Java. The formula of the PMT function is:

`(D7*D9/12)/(1-(1+D9/12)^(-(D11/12)*12))`

where:

- D7 = Finance Amount
- D9 = Rate
- D11 = Term

For example

`D7 = $1,00,000,`

D9 = 10%,

D11 = 36

Here the output of PMT function i.e. monthly payment will be

`$3,226.72`

Please anyone help me to calculate this function value in Java.

Answer

assuming all variable of double type:

```
result=(d7*d9/12)/Math.pow((1-(1+D9/12),(-(d11/12)*12)))
```