PMT has four siblings. Give any four of rate, nper, pmt, pv and fv, and one function returns the fifth:
FV(rate, nper, pmt, [pv]): what regular deposits grow to.
PV(rate, nper, pmt, [fv]): what a stream of payments is worth today, such as how much a payment you can afford will borrow.
NPER(rate, pmt, pv, [fv]): how many periods until a balance is paid off.
RATE(nper, pmt, pv, [fv]): the rate per period that makes the numbers work. Multiply by 12 for an annual rate on monthly payments.
The same sign rule applies: money you pay in is negative, money you get back is positive. If NPER or RATE returns #NUM!, check that the payment and the loan have opposite signs.