Solving for Rate with Unknown Payment

rnewton

New Member
Joined
Apr 12, 2018
Messages
11
I am attempting to bulid a formula that will determine rate on an "end of the period" loan where the only knowns are:

Starting Balance
Term and frequency of payments
Number of payments made
Current Balance

For example: On a $100,000 30yr mortgage, 12 payments have been made, and the current balance is $98,524.66. What is the interest rate?

Thank you!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I don't believe it can be done with a "reasonable" formula. (I don't consider iterative formulas with circular references to be "reasonable".)

In fact, I was surprised it could be done at all. I thought there were an infinite number of solutions.

But I tried the following:

A1: =RATE(12,B1,-100000,98524.66)
B1: =PMT(C1,30*12,-100000)
D1: =A1-C1

Using Solver:
Set objective: D1
To value: 0
By changing: C1

The result is 0.416674775301243% in A1 and 0.416674835056541% in C1, with -5.97552979320071E-10 in D1.

Note 1: A1 and C1 are the periodic (monthly) rate. You can annualize any number of ways, as prescribed by your region. Typically, 12*C1 or (1+C1)^12-1.

Note 2: You neglect to give the payment frequency. I assume monthly.
 
Last edited:
Upvote 0
The answer to your question is yes, payment frequency is monthly. You definitely figured it out using solver. Until now I wasn't even aware of solver, it seems pretty cool.

What do you think about the possibility of calculating this based upon a factor of principal paydown and time? I know that any loan at a given term, rate, and payment frequency will pay down the balance at a consistent pace. For example:

A loan of any size with monthly payments, a 360 month term, and a rate of 5.00% will pay down the balance by approximately 1.475% in 12 months, 3.026% in 24 months, etc.


I don't believe it can be done with a "reasonable" formula. (I don't consider iterative formulas with circular references to be "reasonable".)

In fact, I was surprised it could be done at all. I thought there were an infinite number of solutions.

But I tried the following:

A1: =RATE(12,B1,-100000,98524.66)
B1: =PMT(C1,30*12,-100000)
D1: =A1-C1

Using Solver:
Set objective: D1
To value: 0
By changing: C1

The result is 0.416674775301243% in A1 and 0.416674835056541% in C1, with -5.97552979320071E-10 in D1.

Note 1: A1 and C1 are the periodic (monthly) rate. You can annualize any number of ways, as prescribed by your region. Typically, 12*C1 or (1+C1)^12-1.

Note 2: You neglect to give the payment frequency. I assume monthly.
 
Upvote 0
A loan of any size with monthly payments, a 360 month term, and a rate of 5.00% will pay down the balance by approximately 1.475% in 12 months, 3.026% in 24 months, etc.

That seems to be correct. Never thought about it that way. And I see where we might go with that.

But before I pursue the idea (if time permits) and discuss it, I need to know: why are you asking? If this isn't homework or a test question, what is the practical application of this solution?
 
Upvote 0
The purpose is to enhance a marketing list of existing mortgages. We cannot get rate or payment information, and are trying to approximate rate.
 
Upvote 0
Or make a little table to do the iteration.

A1 -100,000 [loan value]
B1 30 [years]
C1 12 [periods]
D1 98524.66 [balance after 12 periods]

then a little table, with two starting rows.

B4 0% [any starting value]
C4 =PMT(B4/12,$B$1*12,$A$1) [monthly payment]
D4 =FV(B4/12,$C$1,C4,$A$1) [balance after 12 periods]

and
B4 10% [a different starting value]
C5 filled down
D5 filled down

now start interpolation/extrapolation
B6 =FORECAST($D$1,B4:B5,D4:D5)
C6 filled down
D6 filled down

B6:D6 filled down, say 20 rows

then read (annual) interest rate from first column of table
=LOOKUP(100,B4:B23)

Just offered as an alternative to the wonderful goal seeker.
 
Last edited:
Upvote 0
A loan of any size with monthly payments, a 360 month term, and a rate of 5.00% will pay down the balance by approximately 1.475% in 12 months, 3.026% in 24 months, etc.

I was able to prove that you are right: for a given periodic rate "r":

fv[k] / pv = ( (1+r)^n - (1+r)^k ) / ( (1+r)^n - 1 )

which is independent of pmt, where fv[k] is the balance after k periods, pv is the original loan, and n is the number periods to reduce the loan to zero.

However, the form of the right-hand expression does not lend itself to deriving "r" algebraically
[*], given fv[k], pv, k and n.

The best I can do is:

(1+r)^k = (1-c)*(1+r)^n - c

where c = fv[k] / pv.

So we're back to using Goal Seek or Solver, albeit with a much simpler objective formula.


-----
[*] I should say: with an Excel formula, which might include an Excel function that iterates internally (e.g. RATE).
 
Last edited:
Upvote 0
The best I can do is:
(1+r)^k = (1-c)*(1+r)^n - c
[....]
So we're back to using Goal Seek or Solver, albeit with a much simpler objective formula.

I'll be back with a recommended solution later. I have to run off to an appointment now.
 
Upvote 0
Sorry that it took so long to post my recommended solution.

Call the following UDF from Excel using myRate(100000, 360, 98524.66, 12) .

Note that I have a typo in posting #7 . The correct equation is:

0 = (1-c)*(1+r)^n - (1+r)^k + c

where c = fv[k] / pv .

Code:
Option Explicit

Function myRate(pv As Double, n As Long, bal As Double, k As Long, Optional r As Double = 0.1)
Const nLoop As Long = 200
Const maxDbl As Double = (2 ^ 1023 - 2 ^ (1023 - 53)) * 2
Dim c As Double, i As Long
Dim f As Double, f0 As Double, r0 As Double, df As Double
Dim minF As Double, absF As Double, minR As Double

' determine r (periodic rate) for c = fv[k]/pv
' given only pv (loan amt), n (#periods to amortize loan to zero),
' fv[k] (bal after k periods), and k (#payments made).
' note: pmt is not given. thus:
' 0 = (1-c)*(1+r)^n - (1+r)^k + c

On Error GoTo badVal
If n <= 0 Or k <= 0 Or n < k Then GoTo badVal
If r < -1 Then GoTo badVal
c = Abs(bal / pv)

On Error GoTo done
minF = maxDbl
f0 = 0
r0 = r
minR = r0
For i = 1 To nLoop
    f = (1 - c) * (1 + r) ^ n - (1 + r) ^ k + c
    If f = 0 Then minF = f: minR = r: GoTo noErr
    absF = Abs(f)
    If absF < minF Then
        minF = absF: minR = r
    ElseIf absF = minF Then
        If r < minR Then minR = r
    End If
    If f = f0 Then Exit For
    If i = nLoop Then Exit For
    df = n * (1 - c) * (1 + r) ^ (n - 1) - k * (1 + r) ^ (k - 1)
    ' newton-raphson method
    r = r0 - f / df
    If r = r0 Or r < -1 Then Exit For
    r0 = r
    f0 = f
Next

done:
    ' arbitrarily "close to zero"
    If Abs(minF) < 0.00005 Then GoTo noErr
    myRate = CVErr(xlErrNum)
    Exit Function
badVal:
    myRate = CVErr(xlErrValue)
    Exit Function
noErr:
    myRate = minR
End Function
 
Last edited:
Upvote 0
Another possible Option:-
NB:- Results in "MsgBox", based on data as shown below:-
Code:
[COLOR=royalblue][B]Row No [/B][/COLOR] [COLOR=royalblue][B]Col(A)    [/B][/COLOR] [COLOR=royalblue][B]Col(B) [/B][/COLOR] [COLOR=royalblue][B]Col(C)       [/B][/COLOR] [COLOR=royalblue][B]Col(D)     [/B][/COLOR]
1.      Principle  Term    sTerm Amount  sTerm Mths 
2.      100000     360     98524.66      12

Code:
[COLOR=navy]Sub[/COLOR] MG15Apr53
[COLOR=navy]Dim[/COLOR] P [COLOR=navy]As[/COLOR] Double, Term [COLOR=navy]As[/COLOR] [COLOR=navy]Long,[/COLOR] Temp [COLOR=navy]As[/COLOR] Double, sTerm [COLOR=navy]As[/COLOR] [COLOR=navy]Long,[/COLOR] oVal [COLOR=navy]As[/COLOR] Double
[COLOR=navy]Dim[/COLOR] n [COLOR=navy]As[/COLOR] [COLOR=navy]Long,[/COLOR] Pnt1 [COLOR=navy]As[/COLOR] Double, Pnt2 [COLOR=navy]As[/COLOR] Double, c [COLOR=navy]As[/COLOR] Double
P = [a2]: Term = [B2]: Temp = [c2]: sTerm = [d2]
[COLOR=navy]Do[/COLOR] Until Pnt1 > Pnt2
    c = c + 0.000001
    [COLOR=navy]If[/COLOR] c > 1 [COLOR=navy]Then[/COLOR] GoTo NoMatch
    Pnt1 = ((P * ((1 + c) ^ (sTerm + 1) - (1 + c) ^ sTerm)) - (Temp * c)) / (((1 + c) ^ sTerm) - 1)
    Pnt2 = ((P * ((1 + c) ^ (Term + 1) - (1 + c) ^ Term))) / (((1 + c) ^ Term) - 1)
[COLOR=navy]Loop[/COLOR]
[COLOR=navy]If[/COLOR] c = 0.000001 [COLOR=navy]Then[/COLOR]
    MsgBox "Data does not Compute"
[COLOR=navy]Else[/COLOR]
    MsgBox "Principle = " & P & ".  Term = " & Term & ". Rep'[COLOR=green][B]nt to " & sTerm & " Mth = " & Temp & vbLf & vbLf & _[/B][/COLOR]
    "Annual Rate = " & Format(((1 + c) ^ 12) - 1, "0.00%") & vbLf _
    & "Monthly Rate =" & Format(c, "0.0000%") & vbLf _
    & "Rep'[COLOR=green][B]nts/Mth = " & Pnt2[/B][/COLOR]
[COLOR=navy]End[/COLOR] If
NoMatch:
[COLOR=navy]End[/COLOR] [COLOR=navy]Sub[/COLOR]
Regards Mick
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,791
Members
449,188
Latest member
Hoffk036

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top