1

I'm using this formula =DATEDIF(B2; C2; "M") on Googles spreadsheet to calculate months.

I expected when entering a begindate B2 22-4-2013 and enddate C2 31-8-2014 to get an exact result: 16,3397.

Unexpected result is only full months 16.

5
  • Welcome. How did you come up with 16,3397? – marikamitsos Mar 8 at 12:29
  • I used an other calculation program for this – Joehoe Mar 8 at 12:31
  • "I used an other calculation program for this". Like...? Please be specific. If it is an online one, do share the URL. – marikamitsos Mar 8 at 12:33
  • Ah according to the program there are 30,41671512 days in a month and 497 days in this period. Therefore period in days/days a month = 497/30,41671512 = 16,3397 months – Joehoe Mar 8 at 12:44
  • =(C2-B2)/(365/12) – Oleg_S Mar 9 at 6:24
0

You asked for

"a more accurate calculation of months with google spreadsheets?".

Also in my question on how you came up with the number 16,3397 you said

according to the program there are 30,41671512 days in a month and 497 days in this period

So this is the formula you should be using

=DAYS(C2+1,B2)/(365/12)

You can also use

=DATEDIF(B2,C2+1,"D")/(365/12)

We use C2+1 to also count the last day as well.
The way Google counts, it does not take in account the last day.

enter image description here

1
0

Based on your comments above, it sounds like you've already solved your own problem but just haven't realized it:

=(DATEDIF(B2; C2; "D")+1)/30,41671512

To be ultra-clear, use "D" instead of "M", add 1 (since it appears you are counting the number of days between any two consecutive dates as 2 not the true difference of 1), and divide by the days-per-month figure you provided.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.