Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Date Calculator Add and Subtract in Excel

· 5 min read · Home Tech

In this article
  1. How Excel Stores Dates
  2. Adding and Subtracting Days
  3. Adding and Subtracting Months with EDATE
  4. Adding and Subtracting Years
  5. Using the DATEDIF Function for Differences
  6. Common Mistakes and How to Avoid Them
  7. Working with Time and Dates Together
  8. Frequently Asked Questions

To add or subtract dates in Excel, you use simple arithmetic with the DATE function or the EDATE function for months. For example, =A1+30 adds 30 days to the date in A1, and =EDATE(A1,3) adds 3 months. This article explains the methods, common pitfalls, and how to handle date calculations in Excel accurately.

How Excel Stores Dates

Excel treats dates as serial numbers. January 1, 1900, is serial number 1, and each day after that increments by 1. For example, January 1, 2025, is stored as 45658. This is why you can add or subtract numbers directly to dates: adding 7 to a date gives you the date one week later. When you see a date in a cell, Excel is just formatting the underlying serial number. This system is consistent across all modern Excel versions, though the starting date differs for the 1904 date system used on some older Mac files.

Adding and Subtracting Days

The simplest operation is adding or subtracting a fixed number of days. If cell A1 contains a date, you can write:

  • =A1+10 – adds 10 days
  • =A1-10 – subtracts 10 days
  • =A1+1 – adds one day (the next day)

You can also use the DATE function to build a date from year, month, and day components: =DATE(2025,1,15) returns January 15, 2025. To add days using DATE, you can do =DATE(2025,1,15)+30 which gives February 14, 2025. This approach is clear if you need to construct dates dynamically from other cells.

Adding and Subtracting Months with EDATE

For month-based calculations, the EDATE function is the right tool. The syntax is =EDATE(start_date, months). For example, =EDATE(A1,6) returns the date six months after A1. If you need to subtract months, use a negative number: =EDATE(A1,-3). EDATE handles year boundaries correctly: adding 6 months to August 31, 2024, gives February 29, 2024 (leap year), because it adjusts to the last day of the month when the day doesn’t exist. This is a common source of confusion, so always test with month-end dates.

Adding and Subtracting Years

For years, you can either multiply months or use the DATE function. The simplest is =EDATE(A1,12*n) where n is the number of years. For example, =EDATE(A1,12) adds one year. Alternatively, use =DATE(YEAR(A1)+1, MONTH(A1), DAY(A1)) to add exactly one year, but note this will fail on February 29 (leap day) because the resulting date may not exist. EDATE handles that gracefully by returning February 28 or March 1 depending on the year. For most business use, EDATE is the safer choice.

Using the DATEDIF Function for Differences

To find the number of days, months, or years between two dates, use DATEDIF. The syntax is =DATEDIF(start_date, end_date, unit) where unit can be:

  • "d" – days
  • "m" – complete months
  • "y" – complete years
  • "ym" – months remaining after full years
  • "yd" – days remaining after full years

For example, =DATEDIF(A1, B1, "d") gives the exact number of days between two dates. This function is not listed in Excel’s function wizard in some versions, but it works reliably. It’s especially useful for age calculations or project timelines.

Common Mistakes and How to Avoid Them

One frequent error is entering dates as text. If you type 2025-01-01 in a cell, Excel may treat it as text if the cell is formatted as text. Always ensure date cells are formatted as dates (right-click → Format Cells → Date). Another mistake is adding months with simple arithmetic: =A1+30 adds 30 days, not one month. If you need months, use EDATE. Also, when subtracting dates, the result is a serial number; to display it as a number of days, format the cell as a number, not as a date. For example, =B1-A1 might show a date like 01/15/1900 if the cell is formatted as a date, but formatting as General shows the correct day count.

Working with Time and Dates Together

Dates and times are stored as the integer part (days) and fractional part (time) of the serial number. For example, 45658.5 represents noon on January 1, 2025. To add hours, you can add a fraction: =A1+1/24 adds one hour. To add minutes, use =A1+15/(24*60) for 15 minutes. When subtracting times, the result is a fraction of a day, so multiply by 24 to get hours. For example, =(B1-A1)*24 gives the difference in hours. This is useful for calculating elapsed time or deadlines.

Frequently Asked Questions

How do I add 30 days to a date in Excel?

Simply write =A1+30 if the date is in cell A1. Excel adds 30 to the serial number, giving you the date 30 days later. Make sure the cell with the formula is formatted as a date.

Why does my date subtraction show a date instead of a number?

Because the result is a serial number, and the cell is formatted as a date. Right-click the cell, choose Format Cells, and select General or Number to see the day count.

What is the difference between EDATE and DATE?

EDATE adds or subtracts months directly, handling month-end adjustments automatically. DATE builds a date from year, month, and day components, which is useful when you have those numbers in separate cells but doesn’t handle month-end like EDATE.

Can I add business days to a date?

Yes, use the WORKDAY function: =WORKDAY(start_date, days) adds a given number of working days, excluding weekends and optionally holidays. For example, =WORKDAY(A1,10) adds 10 business days. You can add a range of holiday dates as a third argument.

How do I calculate age in Excel?

Use DATEDIF: =DATEDIF(birthdate, TODAY(), "y") gives the age in years. For more detail, use "ym" for months and "md" for days. This is a standard method and works in all Excel versions.

Why does EDATE return March 3 instead of February 28?

EDATE adjusts to the last day of the target month if the original day doesn’t exist. For example, adding one month to January 31 gives February 28 (or 29 in a leap year). If you see March 3, you might be adding one month to February 28, which gives March 28, not March 3. Check your formula and the start date.