The time value of money equation
Every level-payment problem obeys one equation: PV × (1 + i)^N + PMT × (1 + i·t) × [(1 + i)^N − 1] ÷ i + FV = 0. Here i is the rate per payment period, N the number of payments, and t is 1 when payments come at the start of each period (annuity due) and 0 when they come at the end (ordinary annuity).
When payments and compounding happen at different frequencies, the rate per payment period is i = (1 + I/Y ÷ C/Y)^(C/Y ÷ P/Y) − 1, where I/Y is the nominal annual rate, C/Y the compounding periods per year and P/Y the payments per year. PV, PMT and FV each have a closed-form solution; N uses a logarithm; the rate is found numerically.
Sign convention: cash out is negative
The equation only balances if money flowing in and money flowing out have opposite signs. Money you receive is positive and money you pay is negative. Borrowing 10,000 makes PV = +10,000, so the loan payments come out negative. Saving 100 a month makes PMT = −100, so the future balance you get back is positive.
If you solve for the rate or the number of periods and every amount has the same sign, there is no answer, and the calculator tells you so.
Worked example: a 60-month loan
Borrow PV = 10,000 at 6% a year with monthly payments and monthly compounding over N = 60 months. The periodic rate is 6% ÷ 12 = 0.5%. (1.005)^60 = 1.348850, and [(1.005)^60 − 1] ÷ 0.005 = 69.77003. PMT = −(10,000 × 1.348850 + 0) ÷ 69.77003 = −193.33 a month.
Sixty payments total −11,599.68, so the interest is 1,599.68. Switch to “Solve for I/Y” with PMT = −193.33 and you get 6% back.