In Excel you have several tools to perform calculations with dates, this through formulas, below you will understand how to add or subtract days, months or years to a date, obtaining as a result a complete date with day, month and year, similar to what is possible to do above with our calculator, let's see:

To add days to a date, use the `SUM`

function. The function syntax is:

Exemplo:

To add 10 days to the date , use the following formula:

The result will be:

It is also possible for you to simply make a common sum, let's say that in cell A1 you have the date that will be used as a basis, the result will be presented in cell A2, in it you can type , so you will also get the desired result as long as cell A1 is formatted as a date.

The advantage of using formula is that you can perform both addition and subtraction, in the example above if we were to reduce 10 days, it would be enough to put a negative sign in the formula in the parameter of number of days, see: , the result would be:

Unlike adding or subtracting days, to add or decrease months it is necessary to use another function, `EDATE`

, its syntax is:

Let's take an example:

We need to add 6 months to a date and know what day it will be, for this we use:

The result will be:

The addition or subtraction of years in a date is also possible through the `EDATE`

function, but for this an adjustment is necessary, let's see how it can be done:

, let's look at an example:

Add 2 years to the current date: =

In the example, the calculation of 12 x 2 is to indicate that I want 2 years to be added, this is because the `EDATE`

function has as its second parameter the number of months, so a year is 12 months, multiplying by 2 which is the number of years we want to calculate, we will have the result. The example may seem complex and you may ask yourself, why not put already 24 instead of 12 x 2?!, and the answer is simple, if you need to calculate several years, it is not necessary to know how many I have to say.

In the same logic as the reduction in days, to reduce years in the date, you just need to indicate the desired value with a negative sign in the parameter of number of months.

In addition to the `EDATE`

function, it is also possible to perform the calculations with the `DATA`

function, but for this the complexity is a little higher, let's look at an example of what it would be like to add 2 years:

The use of the `DATE`

function, as complex as it is, allows that using only one function it is possible to perform additions or subtractions in days, months and years.

If you are looking to perform these calculations in Google Sheets, the `EDATE`

function is fully compatible, so you can use it in both Excel and Google Sheets.