Add or subtract days from a date
Suppose that a bill of yours is due on the second Friday of each month. You want to transfer funds to your checking account so that those funds arrive 15 calendar days before that date, so you’ll subtract 15 days from the due date. In the following example, you’ll see how to add and subtract dates by entering positive or negative numbers.
-
Enter your due dates in column A.
-
Enter the number of days to add or subtract in column B. You can enter a negative number to subtract days from your start date, and a positive number to add to your date.
-
In cell C2, enter =A2+B2, and copy down as needed.
Add or subtract months from a date with the EDATE function
You can use the EDATE function to quickly add or subtract months from a date.
The EDATE function requires two arguments: the start date and the number of months that you want to add or subtract. To subtract months, enter a negative number as the second argument. For example, =EDATE(«9/15/19»,-5) returns 4/15/19.
-
For this example, you can enter your starting dates in column A.
-
Enter the number of months to add or subtract in column B. To indicate if a month should be subtracted, you can enter a minus sign (-) before the number (e.g. -1).
-
Enter =EDATE(A2,B2) in cell C2, and copy down as needed.
Notes:
-
Depending on the format of the cells that contain the formulas that you entered, Excel might display the results as serial numbers. For example, 8-Feb-2019 might be displayed as 43504.
-
Excel stores dates as sequential serial numbers so that they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2010 is serial number 40179 because it is 40,178 days after January 1, 1900.
-
If your results appear as serial numbers, select the cells in question and continue with the following steps:
-
Press Ctrl+1 to launch the Format Cells dialog, and click the Number tab.
-
Under Category, click Date, select the date format you want, and then click OK. The value in each of the cells should appear as a date instead of a serial number.
-
-
Add or subtract years from a date
In this example, we’re adding and subtracting years from a starting date with the following formula:
=DATE(YEAR(A2)+B2,MONTH(A2),DAY(A2))
How the formula works:
-
The YEAR function looks at the date in cell A2, and returns 2019. It then adds 3 years from cell B2, resulting in 2022.
-
The MONTH and DAY functions only return the original values from cell A2, but the DATE function requires them.
-
Finally, the DATE function then combines these three values into a date that’s 3 years in the future — 02/08/22.
Add or subtract a combination of days, months, and years to/from a date
In this example, we’re adding and subtracting years, months and days from a starting date with the following formula:
=DATE(YEAR(A2)+B2,MONTH(A2)+C2,DAY(A2)+D2)
How the formula works:
-
The YEAR function looks at the date in cell A2, and returns 2019. It then adds 1 year from cell B2, resulting in 2020.
-
The MONTH function returns 6, then adds 7 to it from cell C2. This gets interesting, because 6 + 7 = 13, which is 1-year and 1-month. In this case, the formula will recognize that and automatically add another year to the result, bumping it from 2020 to 2021.
-
The DAY function returns 8, and adds 15 to it. This will work similarly to the MONTH portion of the formula if you go over the number of days in a given month.
-
The DATE function then combines these three values into a date that is 1 year, 7 months, and 15 days in the future — 01/23/21.
Here are some ways you could use a formula or worksheet functions that work with dates to do things like, finding the impact to a project’s schedule if you add two weeks, or time needed to complete a task.
Let’s say your account has a 30-day billing cycle, and you want to have the funds in your account 15 days before the March 2013 billing date. Here’s how you would do that, using a formula or function to work with dates.
-
In cell A1, type 2/8/13.
-
In cell B1, type =A1-15.
-
In cell C1, type =A1+30.
-
In cell D1, type =C1-15.
Add months to a date
We’ll use the EDATE function and you’ll need the start date and the number of months you want to add. Here’s how to add 16 months to 10/24/13:
-
In cell A1, type 10/24/13.
-
In cell B1, type =EDATE(A1,16).
-
To format your results as dates, select cell B1. Click the arrow next to Number Format, > Short Date.
Subtract months from a date
We’ll use the same EDATE function to subtract months from a date.
Type a date in Cell A1 and in cell B1, type the formula =EDATE(4/15/2013,-5).
Here, we’re specifying the value of the start date entering a date enclosed in quotation marks.
You can also just refer to a cell that contains a date value or by using the formula =EDATE(A1,-5)for the same result.
More examples
To add years to or subtract years from a date
Start Date |
Years added or subtracted |
Formula |
Result |
---|---|---|---|
10/24/2013 |
3 (add 3 years) |
=DATE(YEAR(A2)+B2,MONTH(A2),DAY(A2)) |
10/24/2016 |
10/24/2013 |
-5 (subtract 5 years) |
=DATE(YEAR(A4)+B4,MONTH(A4),DAY(A4)) |
10/24/2008 |
In Microsoft Excel, the date can be inserted in a variety of ways, including using a built-in function formula or manually entering the date, such as 22/03/2021, 22-Mar-21, 22-Mar, or March 22, 2021. These date functions are typically used for cash flows in accounting and financial analysis.
In Excel, there is a built-in function called TODAY() that will insert the exact today’s date and will give the updated date whenever the workbook is opened. The NOW() built-in function can also be used to insert the current date and time, and this function will be kept up to date if we open the workbook multiple times.
Inserting the date:
In the Formula tab, the built-in TODAY is categorized under the DATE/TIME function.
Alternate to insert the date in Excel the below keyboard shortcut can be used:
CTRL+;
It will insert the current date.
To insert the current date and time we can use the following shortcut keys:
CTRL+; <space key> CTRL+SHIFT+;
It returns the current date and time to us.
1. Inserting specific date in Excel:
We have to use DATE() to insert a specific valid date in Excel. We can notice in the above function that the DATE requests to provide Year, Month, Day values. If we provide the details, the default date will be shown as below:
Image 1.1
Image 1.2
2. Inserting static date and time:
A static value in a sheet does not change if the sheet is recalculated or opened. To do so follow the below steps:
Step 1: Select the cell in which the current date or time will be inserted on a table.
Step 2: Do one of the next:
- Press Ctrl+;(semi-colon) to insert your current date.
- Press the Ctrl+Shift+;(semi-colon) to insert the current time.
- Press Ctrl+;(semi-column) to insert the current date and time then press Space, and press Ctrl+Shift+; (semi-colon).
Static date and time
3. Inserting a date in Excel via a drop-down calendar:
It may be a good idea to include a down calendar in your worksheet if you set up a table for other users and want to make sure that the dates enter correctly. You can fill in the dates with a mouse click and be 100% confident that all dates are entered in a suitable format. You can use Microsoft Date Picker control when you use a 32-bit version of Excel. Microsoft Date Picker Control will not work when you are using a 64-bit Excel 2016, Excel 2013 version.
4. Inserting an automatically updatable today’s date and current time:
If you want to keep your Excel date up-to-date today, use one of the following Excel date functions:
=TODAY() -> inserts in a cell the current date. =NOW() -> inserts in a cell the current and current date.
=TODAY example
=NOW example
Please remember that when using the Excel date functions:
- The date and the time returned will not be refreshed on an ongoing basis, but only when the chain is reopened or re-calculated.
- The functions take the current system clock date and time.
5. Auto-populate dates in Excel
To autofill a series of dates in which one day is incremented, you can use the Excel AutoFill function. It is a common way to automatically fill a column or row. To do so follow the below steps:
- Enter the original date in the first cell.
- Click the first date on your cell and then drag the fill handle to or from the cells you want Excel to add dates.
Autofill weekdays, months, or years:
There are two ways of automatically adding weekdays, months, or years to the selected range of cells. To so follow the below steps:
- You can use the above-mentioned Excel AutoFill options. Click the AutoFill Options icon and choose the option you want when the range is populated by sequential dates.
- Another way to enter your first date will be to right-click the fill handle and drag and release the fill handle through the cells you automatically want to fill with dates. Excel displays a context menu and selects the appropriate option.
Auto-populate dates
Asked by: Dr. Vivienne Jerde
Score: 4.6/5
(75 votes)
Insert a static date or time into an Excel cell
- To insert the date, type the date (like 2/2), and then click Home > Number Format dropdown (in the Number tab) >Short Date or Long Date.
- To insert the time, type the time, and then click Home > Number Format dropdown (in the Number tab) >Time.
How do you add up dates in Excel?
Add or subtract days from a date
- Enter your due dates in column A.
- Enter the number of days to add or subtract in column B. You can enter a negative number to subtract days from your start date, and a positive number to add to your date.
- In cell C2, enter =A2+B2, and copy down as needed.
How do I add 30 days to a date in Excel?
In cell C1, type =A1+30, and then press RETURN . This formula adds 30 days to the date in cell A1. In cell D1, type =C1-15, and then press RETURN . This formula subtracts 15 days from the date in cell C1.
What is the formula in Excel for dates?
Here are a few Excel DATE formula examples: =DATE(2015, 5, 20) — returns a serial number corresponding to 20-May-2015. =DATE(YEAR(TODAY()), MONTH(TODAY()), 1) — returns the first day of the current year and month. =DATE(2015, 5, 20)-5 — subtracts 5 days from May 20, 2015.
How do you add months to a date in Excel?
Add Months to Date
- =EDATE(start date, number of months)
- Step 1: Ensure the starting date is properly formatted – go to Format Cells (press Ctrl + 1) and make sure the number is set to Date.
- Step 2: Use the =EDATE(C3,C5) formula to add the number of specified months to the start date.
42 related questions found
How do I add days to a date in Excel with weekends?
Select a blank cell and type this formula =WORKDAY(A2,B2), and press Enter key to get result.
- Tip: In the formula, A2 is the start date, B2 is the days you want to add.
- Now the end date which add 45 business days excluding weekends has been shown.
How do I add weekly dates in Excel?
To fill date weekly, you can apply a simple formula.
- Select a cell and type the start date. …
- Then in the next cell, A2, type this formula =A1+7, and press Enter key to get the second date. …
- And now you can drag the Cell A2’s autofill handle down to fill dates weekly as you need.
What is the Excel formula for today’s date?
There are two ways to enter the current date in Excel — a formula and shortcut.
…
Shortcuts to get today’s date in Excel
- To inset today’s date: Ctrl + ;
- To insert the current time: Ctrl + Shift + ;
- To enter the current date and time: Ctrl + ; then Space and then Ctrl + Shift + ;
How do I AutoFill dates in Excel 2016?
Use the Fill Handle
- Select the cell that contains the first date. Drag the fill handle across the adjacent cells that you want to fill with sequential dates.
- Select the fill handle. at the lower-right corner of the cell, hold down, and drag to fill the rest of the series.
How do I add a day name to a date in Excel?
Below are the steps to convert date to weekday name using the TEXT function:
- Click on a blank cell where you want the day of the week to be displayed (B2)
- Type the formula: =TEXT(A2,”ddd”) if you want the shortened version of the day or =TEXT(A2,”dddd”) if you want the full version of the days.
- Press the Return key.
How do I increase a date by one day in Excel?
Auto fill a date series that increases by one day
- Enter your initial date in the first cell.
- Click on the cell with the first date to select it, and then drag the fill handle across or down the cells where you want Excel to add dates.
How do I calculate 7 days from a date in Excel?
Therefore, you can add or subtract days as easy as adding or minus the number of days in Excel.
- = date + number of days.
- = date + 7 * number of weeks.
- = EDATE(date, number of months)
- = DATE(YEAR(date) + number of years, MONTH(date),DAY(date))
How do I add Sunday Monday in Excel?
Go to the Number tab in the Format Cells dialog box. Select Custom as the Category. Add dddd into the Type field for the full weekday name or ddd for the abbreviated weekday name. Press the OK button.
How do you autofill dates in Excel without dragging?
Quickly Fill Numbers in Cells without Dragging
- Enter 1 in cell A1.
- Go to Home –> Editing –> Fill –> Series.
- In the Series dialogue box, make the following selections: Series in: Columns. Type: Linear. Step Value: 1. Stop Value: 1000.
- Click OK.
How do you calculate 12 months from a date?
To get around this, bump the date by one in the end. For example, June 1, 2000 to June 1, 2001 is less than twelve months. However, June 1, 2000 to June 2, 2001 is 12 months.
How do I get the month and year from a date in Excel?
Below are the steps to change the date format and only get month and year using the TEXT function:
- Click on a blank cell where you want the new date format to be displayed (B2)
- Type the formula: =TEXT(A2,”m/yy”)
- Press the Return key.
- This should display the original date in our required format.
How do I AutoFill weekly dates in Excel?
How to Autofill Weekdays in Excel
- Key in the starting day name.
- Hover the mouse over the bottom right corner of the cell until you see the Fill Handle.
- With the RIGHT mouse button pressed, drag to select the cells to autofill.
- From the menu that appears, click Fill Weekdays and the selected cells are autofilled.
Where is AutoFill in Excel?
The Fill button is located in the Editing group right below the AutoSum button (the one with the Greek sigma). When you select the Series option, Excel opens the Series dialog box. Click the AutoFill option button in the Type column followed by the OK button in the Series dialog box.
How to Use Excel > Excel Formula > How to Add Days, Weeks, Months and Years to a Date in Excel
How to add DAYS to a date in Excel
Excel stores date value in integer number, to find out n days after a date, add the date and number of days.
The Result
The formula in cell B2 adds a date in cell A2 with number 20. The result, 20 days after May 16, 2019, is June 5, 2019.
There are many ways to get a date value, for the first formula the date value is inserted in a cell, the second formula uses the DATE function then added to the number 20. The result is the same as the first formula.
The third formula uses the TODAY function, this function returning a different date depending on what date it is today. Incidentally, today is May 16, 2019 add number 20 the result is the same as the two previous formulas.
How to add WEEKS to a date in Excel
To find out n weeks after a date, use the addition and multiplication formula. The multiplication formula used to convert weeks into days by multiplying by 7. The addition formula used to add the results of the multiplication formula with a date. The result is n weeks after a date.
The result
1 week after May 16, 2019, is May 23, 2019, and 4 weeks after May 16, 2019, is June 13, 2019.
You can use negative numbers to find n weeks before a date. The result of the formula in cell C3 shows that May 2, 2019, is 2 weeks before May 16, 2019.
How to add MONTHS to a date in Excel
How to add months to a date is different by adding days/weeks to a date.
The first step to do is to extract the year, month, and day of date by using the YEAR, MONTH, and DAY functions. To add n months after a date, add the n value to the MONTH function result, then arrange them all with the DATE function to find out the date after n months.
The result
1 month and 3 months after May 16, 2019, are June 16, 2019, and August 16, 2019, while 2 months and 5 months before May 16, 2019, are March 16, 2019, and December 16, 2019.
You got the same date even though several months have different days.
How to add YEARS to a date in Excel
To get n years after a date is like to get n months after a date. You must extract the date value using the YEAR, MONTH, and DAY functions.
Add the YEAR function result by to the desired n year value, then arrange them all with the DATE function.
The result
You got the same date and month, the different only in year value.
How to add YEARS, MONTHS, DAYS to a date in Excel
What date is 1 year 4 months 17 days after May 16, 2019?
The first step is to extract the date value using the YEAR, MONTH, and DAY functions.
The second step, add number 1 to the YEAR function result, add number 4 to the MONTH function result and add number 17 to the DAY function result.
The third step arranges all in the DATE function.
The formula
=DATE(YEAR(A2)+B2,MONTH(A2)+C2,DAY(A2)+D2)
The result
1 year 4 months 17 days after May 16, 2019, is Oct 3, 2020.
**
What date are 2 years 10 months 5 days before May 16, 2019?
The formula
=DATE(YEAR(A2)+B2,MONTH(A2)+C2,DAY(A2)+D2)
The result
The formula is the same as the previous formula. Use negative numbers to find out the date before a date.
2 years 10 months 5 days before May 16, 2019, is July 11, 2016.
Related Function
Function used in this article