If you want to see the exact gap between 2 dates, then you’re on the correct page. All you have to do is select the dates from the calendar above. The time gap between these two dates will be given in the form of “years, months, weeks, days”.
Now, normally it’s a matter of subtraction when you want to calculate the number of days between two given dates in the same month. However, if you want the exact time span between say 30th November 2005 and 15th August 2020, that’s where the calculator comes to your rescue. This is because it is nearly impossible to do any subtraction here.
So, in order to make bigger calculations, there are different formulae used.
How Do We Know the Exact Difference in the Number of Years?
Usually, by subtracting the years, we can find out the difference. However, there’s a problem here. If date 1 is 1st August 2009 and date 2 is 5th April 2012, then calculating the difference by simply subtracting 2009 from does not 2012 work. You’ll have to calculate the number of months or days from 1st August 2011 to 5th April 2012.
Now, a year has 365 days and a month has 30 or 31 days, with February being an exception. Now, the computer can easily calculate the exact number of days between two given dates by applying some coding.
By dividing the number of days by 365, we get the number of years from the quotient and the number of extra days in the remainder.
Calculating the Number of Months
Now, we have a certain number of days between 1st August 2011 and 5th April 2012. Now, here you cannot subtract between two months because the difference between April and August is different from number of months between August and April (next year).
So, how do we come to this figure?
We know that according to the calendar that we use, there are 30 days in a few months, 31
days in a few and 28 or 29 days in the month of February.
The secret here is that 1 month is considered to be 30 days. Thus, from the number of days you get, you divide the number by 30. The quotient is the number of months and the remainder is the number of days.
How to Calculate the Number of Weeks Between 2 Dates?
Now that we have our answer in years, months and days, finding the number of weeks is no big deal. Just like we divided the number of days by 365 for years and 30 for months, we divide it by 7 for finding the number of weeks.
Suppose, there are 28 days between two dates. That is exactly 4 weeks. Now, if there are 26 days between two dates, then there are 3 weeks and 5 days between the two dates. Basically, when you divide the number of days by 7, the quotient is the answer for the number of weeks and the remainder is the answer for the number of days.
So, that’s how step by step the time span between 2 dates is divided into years, months, weeks and days.