1. that does not look like a formula for a loan at all......check your formula.
2. Excel uses floating point calculation natively, so whether you use double or float or excel, are all not exact for money calculation. I'm guessing your difference with excel is and error in your formula
3. using BigDecimal is correct for money, but not like what you did. You cannot use + - * / with BigDecimal. BigDecimal class has add() subtract() multple() divide() functions. Read the docs.
1. Read the website......P is Principle....not payment.....A is payment.
2. I'm pretty sure it's not float or double issue, unless you are calculating extremely small or extremely big numbers. When it is about float or double accuracy, the differences are very very small, are you differences very very small?
3. Read the docs, it's pretty simple. ie:
in double: double a = (double) b * (double) c
in BigDecimal, you do: BigDecimal a = (new BigDecimal(b)).multiply(new BigDecimal(c));