# How to create a more accurate calculation of months with Google spreadsheets?

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.

• 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

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.

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