Calculation Issues

Calculate Date and Time Differences in Separate Excel Columns

Steven ParkerSteven Parker Nov 18, 2026 868 views

Question details

Calculate elapsed time from dates and times stored in separate spreadsheet columns.

Calculate Date and Time Differences in Separate Excel Columns
Product
Microsoft Excel
Device & OS
not provided
Scenario
An operational report keeps start and end dates and times in separate fields.
Observed behavior
The user needs a duration without merging the date and time fields into single cells.
Before you start

Check that Excel recognizes the date and time entries as dates and times rather than text. Identify the start and end columns and confirm that the end date and time occur after the start.

Solution 1Recommended

Subtract the combined start and end values

Use this formula to calculate elapsed time across dates, including durations longer than one day.

1
Identify the columns

For this example, place the start date in A2, start time in B2, end date in C2, and end time in D2.

2
Enter the formula

Select an empty result cell, enter =(C2+D2)-(A2+B2), and press Enter. Adjust the cell references to match your worksheet.

3
Format the duration

Select the result cell, press Ctrl+1 to open Format Cells, choose Custom, and enter [h]:mm in the Type field. Click OK.

4
Apply it to other rows

Drag the result cell's fill handle down to calculate durations for the remaining rows.

Subtract the combined start and end values
Use elapsed-hour formatting: The [h]:mm format displays total hours rather than resetting the hour count after 24 hours. For example, a duration of one day and two hours appears as 26:00.
Calculate elapsed time in WPS

Calculate Separate Date and Time Fields in WPS Spreadsheets

Use WPS Spreadsheets to subtract separate start and end date and time fields, then format the result as total elapsed hours.

  1. 1. Open the worksheet: Open WPS Spreadsheets and choose Open to load your workbook.
  2. 2. Check the fields: Locate the start date and time and the end date and time. For example, use A2 and B2 for the start and C2 and D2 for the end.
  3. 3. Calculate the difference: Select an empty cell and enter =(C2+D2)-(A2+B2), adjusting the references if needed.
  4. 4. Format elapsed hours: Open Format Cells for the result, choose Custom, and enter [h]:mm as the format.
  5. 5. Fill down and save: Drag the result cell's fill handle down for other rows, then use File > Save to save the workbook.
Calculate elapsed time without merging date and time cellsDisplay durations over 24 hours with a custom formatOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I calculate elapsed time across midnight in Excel?

Include both dates and times in the formula, such as =(C2+D2)-(A2+B2), where A2 and B2 are the start date and time and C2 and D2 are the end date and time.

Why does my duration reset after 24 hours?

A standard time format can display only the time within a day. Open Format Cells, choose Custom, and use [h]:mm to display total elapsed hours.

Can I calculate the difference using only the time columns?

Yes. Use =MOD(D2-B2,1) for a duration known to be less than 24 hours, including a time range that crosses midnight. The formula ignores dates and cannot account for full days.

Why does the formula return an error?

Check that the referenced cells contain valid Excel dates and times rather than text. Re-enter text values as dates or times, and confirm that the formula points to the correct cells.