The calculator subtracts one date from the other and gives the difference in days. March 1 to March 15 is 14 days — the number of times you turn the calendar page to get from the first date to the second. Below the number, the same answer is split into whole weeks and the days left over. Months are left out on purpose: “one month” from January 31 means nothing precise, while a day is always a day.
Counting the last day
The default leaves the end date out, which matches how spreadsheets and most date tools count: 15 minus 1 is 14. When both ends of the range should count — days of an event, days on a prescription, days of leave — switch on “Count the last day” and the answer grows by one. The line under the result always says which of the two you are looking at.
In Excel and Google Sheets
Both store a date as a whole number of days, so the difference is plain subtraction. With the start date in A1 and the end date in B1:
=B1-A1— days between, end date not counted;=DAYS(B1,A1)— the same thing as a function; the end date goes first;=B1-A1+1— both ends counted.
If the cell shows a date like 01/14/1900 instead of 14, it is formatted as a date; switch it to Number. DAYS works the same way in Google Sheets, and it accounts for leap years on its own.