Number of months between two dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to figure out the number of months (in decimal form) between two dates. For example, from 10/12/2004 to 12/31/2004, how many months would that be?
 
If you mean complete months, use

=DATEDIF(A1,B1,"m")

If you mean months with a fractional portion, use

=DATEDIF(A1,B1,"m")+(DATEDIF(A1,B1,"md")/30)

See www.cpearson.com/excel/datedif.htm for more information about the
DATEDIF function.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



Trace398 said:
I am trying to figure out the number of months (in decimal form) between
two dates. For example, from 10/12/2004 to 12/31/2004, how many months
would that be?
 
=DAYS360(A2,B2)/30

The formula above returns the number of months based on 12 30 day
months. The formula below returns number of months based on a 365 day
year. Both assume that A2 represents on date and B2 represents
another. Remember to format the cell containing the formula as a
'number cell' with a specified number of decimal places.

=(B2-A2)/30
 
thanks so much for helping!!

buuuut...i am just getting zeros. here is one example of what i want. i want to know in decimal form how many months are between 10/12/2004 and 12/31/2004. so i entered =(12/31/2004-10/12/2004)/30 (i also tried the dates the other way around)

i made sure to format the cells the way you said, and it just came up as 0.00.

any suggestions?
 
Back
Top