# PMT() & DATEDIF() Problems

#### Beachcomber

##### New Member
Hi, I'm making a simple Loan calculator to determine my monthly payments using the PMT() function.

PMT(rate,nper,pv,fv,type)

My inputs are as follows:

RATE (Interest Rate): 9%
NPER (Number periods): DATEDIF(TODAY(),6/1/2006,"m") [Note: The second date is actually in a seperate cell, and I reference that cell in the formula]
PV (Present Value): \$50000
FV (Future Value):
Type: 1 (Payments made at beginning of each period)

I'm trying to integrate these inputs into my function in the following manner:

=PMT(.09/12,DATEDIF(TODAY(),6/1/2006,"m"),50000,0,1)

In order to determine my monthly payments. I'm making the number of periods the difference between a future date (6/1/2006) and today's date (11/9/05).

However, the Type is 1, meaning that I make my payments at the beginning of each much eg. March 1, etc.

When I'm using DATEDIF() to determine the number of whole months between two dates, it does not always return the proper number of months for the NPER(). For example, taking todays date (11/09/05) and finding the number of months between it and 6/1/2006, returns a value of 6 months.

However, there are actually 7 payment periods since June 1, 2006 is also a payment period and the date the loan is terminated. I know I could simply add +1 to my DATEDIF() Formula to get the proper number of months, but I want my formula to work for any date, even if the current date is the first of a month.

Any suggestions or strategies for improving my formula? Is DATEDIF() the best way to find the number of months for my NPER in the PMT() Function? Thank you so much - this problem has been very stressful.

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi,

If your date is in A1, try:

=PMT(0.09/12,DATEDIF(TODAY(),EOMONTH(A1,0)+1,"M"),50000,0,1)

Replies
0
Views
187
Replies
13
Views
981
Replies
4
Views
528
Replies
1
Views
299
Replies
1
Views
233

1,211,850
Messages
6,104,361
Members
447,902
Latest member
chriswebs23

### 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.

### Which adblocker are you using?

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

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