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.
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.Sign up to join this community
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
You can also use
C2+1 to also count the last day as well.
The way Google counts, it does not take in account the last day.
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.