As Sjoerd commented I believe these kinds problems can be solved using TimeValue
and Annuity
, as detailed in the documentation.
For example if you have a monthly payment of \$304.22 on a 36 month \$10,000 loan you can calculate your interest rate as:
FindRoot[TimeValue[Annuity[304.22, 36], i/12] == 10000, {i, 0.1}]
{i -> 0.0600014} (* 6% yearly interest *)
If you do not have access to these finance functions or you simply prefer a more transparent approach here is an old function I put together many years ago as an exercise, slightly refined:
f[a_List] := Tr @@ f[a, 1]
f[a_, m_?Negative, t___] := f[a, {m, All}, t]
f[{p_, n_, i_}, {z__, m_} | {m_List} | m_, t_: 0] :=
Module[{j, y = p ((1 + i)^(# - 1) i)/((1 + i)^n - 1) &},
Table[y@j, #] &[ {j, z, m} /. {e_?Negative :> n + e + 1, All -> n} ] //
{(1 - t) (y[n + 1] - #), #}\[Transpose] &
]
(Apologies as this clearly wasn't written with readability in mind.)
My notes say I based this on A Derivation of Amortization by Bret D. Whissel.
The one (list) parameter syntax for this function returns the payment:
f[{10000, 36, 0.06/12}]
304.219
We can therefore search for this value using FindRoot
, as in the first example:
FindRoot[f[{10000, 36, i/12}] == 304.22, {i, 0.1}]
FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances. >>
{i -> 0.0600014}
A warning message is issued but the result is still correct.
The two parameter syntax returns a form of amortization table with interest and principal, e.g. first three payments:
f[{10000, 36, 0.06/12}, 3]
{{50., 254.219}, {48.7289, 255.49}, {47.4515, 256.768}}
Fourteenth through seventeenth payments:
f[{10000, 36, 0.06/12}, {14, 17}]
{{32.9708, 271.249}, {31.6146, 272.605}, {30.2515, 273.968}, {28.8817, 275.338}}
Last two payments:
f[{10000, 36, 0.06/12}, -2]
{{3.01953, 301.2}, {1.51353, 302.706}}
All payments, plotted:
f[{10000, 36, 0.06/12}, All] // Accumulate // Transpose // ListLinePlot

Anuity
doc page should provide you with all the information you need. $\endgroup$