Excel Calculate Midpoint Between Two Dates
In this article
To calculate the midpoint (average) between two dates in Excel, use the formula =(A1+B1)/2 where A1 and B1 are the two date cells. This works because Excel stores dates as serial numbers, so the arithmetic average of those numbers gives the midpoint date. Format the result cell as a date to see the correct output.
How Excel Stores Dates
Excel treats every date as a whole number (serial number) and every time as a decimal fraction of that number. For example, in the Windows version of Excel, January 1, 1900 is serial number 1, January 2, 1900 is 2, and so on. July 20, 2024 is serial number 45493. This system allows you to perform normal arithmetic on dates—adding, subtracting, and averaging all work directly on the underlying numbers.
When you enter a date like 2024-07-20, Excel converts it to that serial number for calculation, but displays it according to the cell’s number format. If the cell is formatted as General, you will see the serial number, not the date. That is why the result of a midpoint formula often appears as a large number until you apply a date format.
Basic Midpoint Formula
The midpoint between two dates is simply the arithmetic mean of their serial numbers. The formula is:
=(StartDate + EndDate) / 2
Replace StartDate and EndDate with cell references or direct date values. For example, if the start date is in cell A2 and the end date is in B2, the formula is =(A2+B2)/2.
If you want to include times, the same formula works because times are decimal fractions. For instance, the midpoint between 2024-07-20 08:00 and 2024-07-22 20:00 is 2024-07-21 14:00. The formula =(A2+B2)/2 will give exactly that when both cells contain date-time values.
Using the MEDIAN Function
For two dates, MEDIAN gives the same result as the average. The formula =MEDIAN(A2,B2) returns the middle value when there are only two numbers, which is exactly the midpoint. However, MEDIAN ignores empty cells and text, while AVERAGE may return errors if any cell is blank or contains text. If you are certain both cells contain valid dates, either works. If there is a chance one cell is empty, MEDIAN is safer because it will return the other date rather than an error.
Formatting the Result as a Date
After entering the formula, the result cell may show a number like 45493.5. To display it as a date, follow these steps:
- Select the cell with the formula.
- Press
Ctrl+1(Windows) orCmd+1(Mac) to open the Format Cells dialog. - Go to the Number tab, choose Date under Category.
- Pick a date format that suits you (e.g.,
mm/dd/yyyyordd-mmm-yyyy). - Click OK.
If you want to include the time in the result, choose a date-time format under the Custom category, such as yyyy-mm-dd hh:mm.
Common Mistakes and How to Avoid Them
- Forgetting to format the result: The most common issue is seeing a serial number instead of a date. Always apply a date format.
- Using text dates: If you type dates as text (e.g., "July 20, 2024"), Excel may not recognize them as dates, and the formula will return a #VALUE! error. Use genuine date values or the DATE function.
- Blank cells: If one of the cells is empty,
=(A2+B2)/2will treat the blank as 0, giving a midpoint far in the past. UseMEDIANor ensure both cells are filled. - Time zone confusion: Excel does not handle time zones. If your dates are in different zones, convert them to a common zone before calculating.
- Rounding: The midpoint may fall on a half-day (e.g., 12:00 PM). The formula gives the exact time, but if you only want the date, you can round down with
=INT((A2+B2)/2)or round to the nearest day with=ROUND((A2+B2)/2,0).
Alternatives: DATEDIF and Other Functions
While the average formula is the simplest, you might need other calculations. For example, to find the number of days between two dates, use =B2-A2. To find the date that is exactly halfway in terms of days but not necessarily the arithmetic mean (which is the same thing), you can also use =A2 + (B2-A2)/2. This formula adds half the difference to the start date, which is mathematically identical to (A2+B2)/2.
If you need to calculate a midpoint that is not the average (e.g., the date that is 25% of the way between two dates), use =A2 + (B2-A2)*0.25. This is useful for project planning or milestone tracking.
Frequently Asked Questions
Why does my midpoint formula show a number like 45493?
That number is the serial number of the date. Excel stores dates as numbers, and the cell is formatted as General. To see the date, change the cell format to a date format (right-click > Format Cells > Date).
Can I calculate the midpoint between two dates that include times?
Yes. Excel stores date-time as a number with a decimal fraction. The formula =(A2+B2)/2 works exactly the same and returns the midpoint in time as well. Format the result as a date-time format to see both.
What if one of my date cells is empty?
If a cell is empty, Excel treats it as 0 in arithmetic. That will give a wrong midpoint. Use =MEDIAN(A2,B2) instead, which ignores blanks and returns the other date. Or ensure both cells are filled.
How do I get the midpoint as a date only, without the time?
Use =INT((A2+B2)/2) to truncate the time part, or =ROUND((A2+B2)/2,0) to round to the nearest day. Then format as a date.
Does the midpoint formula work in Google Sheets too?
Yes. Google Sheets also stores dates as serial numbers and uses the same arithmetic. The formula =(A2+B2)/2 works identically, and you format the result as a date via Format > Number > Date.