The Excel Rate function calculates the interest rate required to pay off a specified amount of a loan, or to reach a target amount on an investment, over a given period.
The syntax of the function is :
Where the arguments are as follows:
nper    The number of periods over which the loan or investment is to be paid 
pmt    The (fixed) payment amount per period 
pv    The present value of the loan / investment 
[fv]   
An optional argument that specifies the future value of the loan / investment, at the end of nper payments If omitted, [fv] takes on the default value of 0 
[type]   
An optional argument that defines whether the payment is made at the start or the end of the period. The type argument can have the value 0 or 1, meaning:
0  the payment is made at the end of the period 
[guess]   
An initial estimate at what the rate will be. If this argument is omitted, it will take on the default value of 10% (=0.1) (Note this is only a value for Excel to start off working with  Excel then uses an iterative procedure to converge to the correct rate) 
Cash Flow Convention :
Note that, in line with the general cash flow convention, outgoing payments are represented by negative numbers and incoming payments are represented by positive numbers. This is seen in the examples below.The following spreadsheet shows the Excel Rate function used to calculate the interest rate required, with fixed payments of $1,000 per month, to pay off in full, a loan of $50,000 over a period of 5 years. The payments are to be made at the end of each month.
Formulas:

Results:

In the above example :
The following spreadsheet shows the Excel Rate function used to calculate the interest rate required, to save up $20,000, over 2 years, with a starting value of zero, and monthly savings of $800. The payments are to be made at the start of each month.
Formulas:

Results:

In the above example :
Further examples of the Excel Rate function can be viewed on the Microsoft Office website.
If you get an error from the Excel Rate function, this is likely to be one of the following:
#NUM!   
Occurs if the function fails to converge to a solution. (This may be because you have failed to use the cash flow convention of negative numbers to represent outgoing payments and positive numbers to represent incoming payments. Alternatively, you may need to provide an initial 'guess' to the function.) 
#VALUE!    Occurs if any of the supplied arguments are not recognised as numeric values 
Also, the following problems are encountered by some users:
The result from the Excel Rate function is much higher or much lower than expected.
Many users, when calculating monthly or quarterly payments, forget to convert the interest rate or the number of periods to months or quarters.
Solve this problem by ensuring that the the nper argument is expressed in the correct units. i.e. :
months  =  12 * years; 
quarters  =  4 * years; 
The result from the Excel Rate function appears to be the value 0.
This problem is often due to the formatting of the cell containing the function.
If this is the case, the problem will be fixed by formatting the cell to show a percentage, with decimal places :