To compute dates in Excel, you use basic arithmetic for days (adding or subtracting numbers) and specific functions like EDATE, WORKDAY, and DATEDIF for months, years, and business days. Because Excel stores dates as sequential serial numbers—where January 1, 1900, is number 1—you can treat a date like any other number in a mathematical formula to find deadlines, ages, or project durations.

What You'll Need

  • Microsoft Excel (any modern version)
  • A dataset containing dates formatted as Date cells
  • Basic understanding of how to enter a formula starting with an equals sign (=)

Step-by-Step

  1. Verify Date Formatting: Before computing, ensure your data is actually recognized as a date and not as text. Select your date cells and look at the Home tab in the Number group. The dropdown should say "Date". If it says "Text", Excel cannot perform math on it. To fix this, select the cells, go to the Data tab, select Text to Columns, and click Finish immediately; this often forces Excel to re-evaluate the data type.
  2. Add or Subtract Days: To find a date in the future or past, use a simple plus or minus sign. For example, if cell A1 contains the date 2026-12-05 and you want to find the date 30 days later, type =A1+30 into a new cell. Excel adds 30 to the serial number of the date, resulting in the correct calendar date.
  3. Calculate the Difference Between Two Dates: To find the number of days between two dates, subtract the earlier date from the later date. If A1 is the start date and B1 is the end date, use =B1-A1. Ensure the result cell is formatted as a "Number" or "General" rather than a "Date," otherwise the result will look like a random date from the year 1900.
  4. Add or Subtract Months using EDATE: Adding days is easy, but adding months is tricky because months have different lengths. Use the EDATE function. The syntax is =EDATE(start_date, months). For example, =EDATE(A1, 3) will give you the date exactly three months after the date in A1. To go backward in time, use a negative number: =EDATE(A1, -6) for six months prior.
  5. Compute Business Days using WORKDAY: If you need to calculate a deadline that excludes weekends and holidays, use the WORKDAY function. The syntax is =WORKDAY(start_date, days, [holidays]). For instance, =WORKDAY(A1, 10) calculates the date 10 business days after A1. To include holidays, list your holiday dates in a separate range (e.g., E1:E5) and use =WORKDAY(A1, 10, E1:E5).
  6. Calculate Age or Tenure using DATEDIF: To find the exact number of years, months, or days between two dates, use the "hidden" DATEDIF function (it does not appear in the formula autocomplete list). The syntax is =DATEDIF(start_date, end_date, "unit").
    • Use "Y" for complete years.
    • Use "M" for complete months.
    • Use "D" for total days.
    • Use "YM" for the months remaining after subtracting full years.
    Example: =DATEDIF(A1, B1, "Y") returns the number of full years between the dates.
  7. Use NETWORKDAYS for Duration: While WORKDAY finds a future date, NETWORKDAYS tells you how many working days exist between two dates. Use =NETWORKDAYS(start_date, end_date, [holidays]). This is essential for payroll or project management to see how many actual labor days were spent on a task.

Common Mistakes

The most frequent error is the Incorrect Cell Format. When you subtract two dates, Excel often automatically formats the result cell as a "Date" because the input cells were dates. This leads to a result like "January 15, 1900" instead of "15". Always change the result cell format to "General" or "Number" when calculating durations.

Another common mistake is Entering Dates as Text. If you type a date as "Dec 5th 2026", Excel may treat it as a string of text. Formulas like =A1+30 will return a #VALUE! error because you cannot add a number to text. Always use standard date formats (e.g., 12/5/2026 or 2026-12-05) that match your system's regional settings.

Users also frequently confuse WORKDAY and NETWORKDAYS. Remember: WORKDAY gives you a date (the destination), while NETWORKDAYS gives you a number (the distance). Using the wrong one will result in either a massive serial number or a date in the year 1900.

Tips

Use Named Ranges: If you have a list of company holidays, name that range "Holidays" (via the Name Box next to the formula bar). Your formulas then become much easier to read: =WORKDAY(A1, 10, Holidays) instead of =WORKDAY(A1, 10, $E$1:$E$20).

Dynamic Today's Date: Use the =TODAY() function to create a live dashboard. For example, =TODAY()-A1 will tell you exactly how many days have passed since the date in A1, updating every time you open the file.

Absolute References: When dragging a date formula down a column that refers to a single start date or a holiday list, use dollar signs to lock the cell. For example, =EDATE($A$1, B1) allows you to drag the formula down while keeping the start date fixed in A1 but changing the number of months based on column B.

Troubleshooting

If you see #VALUE!: This almost always means one of your cells is not a real date. Check for leading spaces or non-standard characters. A quick way to test is to use the =ISNUMBER(A1) formula. Since dates are numbers, it should return TRUE. If it returns FALSE, your date is text.

If you see #NUM!: This often happens with DATEDIF if the start date is later than the end date. DATEDIF cannot calculate negative durations. Ensure the earliest date is the first argument in the formula.

If the date looks like a 5-digit number (e.g., 46350): This is not an error; it is the raw serial number Excel uses. Simply go to the Home tab, open the Number format dropdown, and select "Short Date" to convert the number back into a readable date.

If the date is off by one day: Check if you are using NETWORKDAYS. This function includes both the start and end date in its count. If you need to exclude the start date, subtract 1 from the final result.

Frequently Asked Questions

How do I add 6 months to a date?

Use the EDATE function. If your date is in cell A1, type =EDATE(A1, 6). This is more accurate than adding 180 days because it accounts for the varying lengths of months.

Can I calculate the number of weeks between two dates?

Yes. Subtract the start date from the end date and divide by 7. For example: =(B1-A1)/7. Format the result as a number with two decimal places to see partial weeks.

How do I find the last day of the current month?

Use the EOMONTH function. The formula =EOMONTH(TODAY(), 0) will give you the last calendar day of the current month. Changing the 0 to 1 will give you the last day of next month.

How do I subtract business days from a date?

Use the WORKDAY function with a negative number. For example, =WORKDAY(A1, -5) will find the date five business days before the date in cell A1.

Why is my date showing as #######?

This usually happens for two reasons: either the column is too narrow to display the date, or the formula resulted in a negative date (which Excel cannot display). Try widening the column first; if that fails, check your subtraction order.