Add or Subtract Months from a Start Date
To add a number of months to a date, use the EDATE(start_date,months) function.
“Start_date” is the date to which to add, and “months” is the number of months you wish to add. Continuing with the example above, =EDATE(B1,3)” returns August 1, 2024, which is three months after May 1, 2024.
To subtract a number of months from a date, use the EDATE() function with a negative number of months. “=EDATE(A2,-2)” returns February 1, 2024, which is two months before May 1, 2024.

Calculate Intervals Between Two Dates
Calculating intervals between two dates comes up when you are calculating ages or need to keep a project on schedule. Here are several methods for calculating date intervals.
Subtract – When you only need to calculate days (not years or months), the easiest way is to just subtract the cell with the end date from the cell with the start date.

DAYS function – The DAYS function provides almost the exact same functionality.

NETWORKDAYS – This function lets you calculate the number of workdays between two days. It will exclude Saturday and Sundays from the calculation.

You can see that over several months, the difference is quite noticeable! This is good for project management when you need to see how much real work time is left. Like the WORKDAYS function, NETWORKDAYS also offers an optional HOLIDAY argument to exclude additional non-work days.
DATEDIF – The DATEDIF function is very useful when you want to evaluate date intervals in something other than days, although it can also calculate days as well.

Performing Time Interval Calculations
Time math is one of the strengths of Excel. However, it helps to know some important information to make your timesheet calculations work smoothly.
Add and Subtract Times
When you need to add or subtract a fixed number of hours, minutes, or seconds to a time value, just add or subtract the way you would any decimals. If you add 4 hours to 11:30 AM, you get 3:30 PM:

To understand time arithmetic more fully, you need to understand first how Excel stores times.
Try this: in an empty cell, type “=NOW()” and hit <ENTER>. The result shows the current date and time, probably formatted like this: 6/26/2024 9:57
Next, right-click the cell, choose “Format Cells,” and pick “General.” The result should look something like this: 41816.41498
This is how Excel stores date/times—the date is the number to the left of the decimal, and time is the decimal portion of the number, where 0 corresponds to 12:00 AM, 1 is midnight, and every other time of the day falls somewhere in between. Times are decimals values between 0 and 1.
To convert a time to its decimal value, divide the hours (using the 24-hour clock) by 24 (the number of hours in a full day). Example: 12:00:00 PM (Noon) is exactly halfway through the day, so the decimal value is 1 / 2 = 0.5.
To convert a time decimal value to the number of hours, multiply by 24.
Because times are simply numbers between 0 and 1, you can do any arithmetic on times, just as you would with any other decimal numbers. Add them, subtract them, multiply them by two, divide them by four—just like any other decimal numbers.
But there are a couple of warnings as you get into time arithmetic!
Try this, using a 24-hour format:

Why Does 15 hours + 18 hours = 9 hours?
Right-click on Cells A1 through A3, choose “Format Cells,” and select “General.”

This shows that Excel did, in fact, add the two time values, which resulted in a number greater than one, meaning more than a full day. Like an odometer, however, Excel’s standard time formats roll over and show only the decimal portion—0.375, which equals 9:00:00.
When you need to show hours greater than 24, such as when adding up hours from a timesheet, choose a time format that displays the larger numbers:

Applying that format to this example produces 33 hours, as expected:

Create a Timesheet Calculator
Here is a quick example of time calculations in action:

The calculator uses simple time subtraction (Hours Worked) to determine the number of hours worked in each segment: time out – time in, and adds the two shifts together. The weekly total sums the Hours Worked column.
The format for hours worked and weekly total is “[h]:mm,” which ignores seconds and does not display AM or PM. The square brackets around the hours allow this formula to show values greater than 24 hours.

This is just the beginning of calculating formulas using times. From this point, you can develop far more complicated formulas, such as determining the average time required to complete a task, the maximum time between phone calls, etc. As long as you remember that times are just decimal numbers that represent portions of a day, you can work through any remaining calculations. You have the tools, and you know how to use them. Enjoy!