ss said:
Thanks I did add 1 to correct it, I was just
curious as to the mathematics.
Both are "mathematically" correct. It is a question of semantics.
Suppose you were born on 1/1/2011 (A1). How old will you be on 1/1/2012
(A2)?
The correct answer is 1 year; 365 days. So that is =A2-A1.
And usually that is the correct computation for __elapsed__ time. It is the
number of __whole__ days.
But suppose you want to __count__ the number of days in January; that is,
"between" 1/1/2011 (A1) and 1/31/2011 (A2) inclusively.
The correct answer is 31. So that is =A2-A1+1.
And usually that is the correct computation for __counting__ units of time
__inclusively__; that is, including the end points.
By the way, this is a constant source of debate and error. Often people are
vague about which they mean. And it comes up in law and finance all the
time.
For example, if you open an account on 12/4/2011 and close it on 12/5/2011,
are you due 1 or 2 days of interest. (Answer: it depends on bank policy.)
For another example, if you bought stock on 2/5/2009 and you sell it on
2/5/2010, did you hold the stock for "more than year" (short-term gain for
US tax purposes)? According to IRS Pub 550, no. But if you sold it on
2/6/2010, yes. So for the holding purposes, the IRS uses the first formula
above, namely =A2-A1.