# Date Duration Calculator

The `Date Duration Calculator` is a simple online tool you can use to get the entire duration from a start date up until an end date whether you need the entire total years, months, weeks, days or even the entire duration on this sequence.

π Date Duration Calculator
β’

487 days

69 weeks

16 months

1.3 years

### π Entire Duration (Years, Months, Days)

1 year, 4 months

How many total years, months, weeks or days between `September 12, 2024` and `January 12, 2026`? There is `1.3` total years, `16` total months, `69` total weeks, or `487` total days. Now, if we put together the entire duration, between these dates there is

## What is a Date Duration?

A date duration is a total length of time, usually more than a day, that has gone by from a start date where the count-off starts to the end date where it marks the end of count.

With the help of this Date Duration Calculator, you don't have to manually look into your calendars to do the counting. Although, it doesn't take much time if it's only a short period, but if it's a longer duration, then you can resort to using this tool.

## How to use the Date Duration Calculator?

What's great about using this calculator is that you can easily pinpoint where to place your inputs. Each date input fields are marked with it's respective labels. Since the default format of dates are in `MM/DD/YYYY`, a human-readable date just below the input is placed for a quick distinction. Here's how to properly use the calculator:

1. Step 1

The first input field is the `Start Date`, you can double-check that with its label above it. It's in `MM/DD/YYYY` format, meaning Month/Day/Year, but below it is a human-readable date for you. On this field, enter the starting date of the count-off. You can type them or you can click on the calendar icon to choose a date.

2. Step 2

Then, enter the date that marks the end of count-off on the `End Date` input field. With the same input functionality as before, you can either type the date using your keys or click the calendar icon where it gives your clickable date options.

3. Step 3

Finally, click on the `Calculate` button to get your results. Say for example you have added a start date of and end date of , the result should be .

## What are the results of the calculation?

There are boxes below the calculator marked with π Total Days, π Total Weeks, π Total Months and π Total Years. They exactly reflect their labels. That means that on the result section, there is `487 days` on the entire duration between the two dates.

The first 4 boxes display the total results on its respective units, however on the last box marked with π Entire Duration (Years, Months, Days), you'll get the entire duration base on that format. For the example result, between the two given dates, there is a duration of .

## How to compute date duration manually?

I'm going to explain to you how you can manually compute the date duration without flipping your calendars and counting those days.

```  ```
Date Duration = End Date - Start Date
```
```
For our example, let's deal with a start date of February 20, 2024 and an end date of August 22, 2024. Let's put it in a `YYYY-MM-DD` format.
```  ```
Date Duration = 2024-08-22 - 2024-02-20
```
```

The manual calculation includes these steps:

1. Subtract the start date from the end date based on the formula. However, the minuend (first date in the subtraction) has to be the higher date. Then the subtrahend (date to be subtracted to) should be the lower date. Otherwise, we'll get negative result.
2. Do the subtraction by day, then by month and lastly by year, in this particular order.
3. In subtraction, there is a case of borrowing. When borrowing is needed for days, always borrow the entire days of the previous month relative to the given date.

Each of the steps above will be explained more as we go along. Let's begin.

Step 1. Let's convert our date inputs into `YYYY-MM-DD` format.

```  ```
Date Duration = 2024-08-22 - 2024-02-20
```
```

Step 2. Let's do the subtraction starting from days, months then years. We do not subtract from each digit but on the whole value which means we'll subtract the whole day, whole month and whole year.

 2024 - 08 - `22` β 2024 - 02 - `20` `02`

In this example, there's no need to borrow days because the minuend is greater than the subtrahend. So, 22 - 20 is equal to 2 days. Then, let's move forward with months.

 2024 - `08` - `22` β 2024 - `02` - `20` `04` - `02`

In months, 8 months - 2 months is equal to 4 months. To make it clearer, we are able to subtract days and months because we have converted that as number format (YYYY-MM-DD) where we can do mathematical operations.

 `2024` - `08` - `22` β `2024` - `02` - `20` `0000` - `04` - `02`

In years, we'll get zero since 2024 - 2024 is equal to 0. Note that on this is a basic example, we don't have a case where we borrow days or months or years.

Based on your step by step manual solution, we concluded that the date duration between a start date of 2024-02-20 and an end date of 2024-08-22 is:

```  ```
Date Duration = 4 months and 2 days
```
```

## How to borrow days in date duration manual computation?

Make sure that you have read the previous section of this manual computation of date duration for you to easily do it on this stage.

Let's try to solve the duration between a start date of March 13, 2020 and an end date of May 9, 2024.

Step 1. Let's convert these dates into `YYYY-MM-DD` number format so that we can apply subtraction mathematical operation.

```  ```
Date Duration = 2024-05-09 - 2020-03-13
```
```

Step 2. Let's subtract starting from days, months, then years, in this particular order. However, in this step, we need to borrow days. It will be explained as we go along the computation process.

 `2024` - `0504` - `09 30 + 09 39` β `2020` - `03` - `13` `26`

Let's break this red one's one by one. So, we can't subtract 9 days - 13 days. What we can do is borrow days just like normal mathematics. Now, we can't just borrow a few days, the rule is to borrow the entire days of the previously completed month. By the way, we are currently dealing with the first row.

Let's just crash out `05` and replace it with 04 because we need to borrow 1 month.

If we are to borrow the previously completed month, on this date it is May 2024. So, the previously completed month is April 2024. How many days does April have? The answer is 30 days.

For that reason, we can now borrow 30 days plus the current 9 days which makes it 39 days. Let's crash out `09` because our new value is 39. Now we can subtract 39 - 13, the answer would be 26 days.

 `2024` - `0504` - `09 30 + 09 39` β `2020` - `03` - `13` `0004` - `01` - `26`

For months, since the minuend is greater than the subtrahend, there's no need to borrow months. We can just subtract 4 months - 3 months which will give us a 1-month duration.

Finally, for years, we'll subtract 2024 - 2020, which returns as 4 years.

This is a very useful case in terms of borrowing days. This means that we cannot just borrow days either 29, 30 or 31, we have followed a rule here based on the example above. The answer to our manual computation is:

```  ```
Date Duration = 4 years, 1 month and 26 days
```
```

You can confirm that our manual calculation of date duration is accurate by testing it on the date duration calculator.