SharePoint Document Issues

How to Calculate Hours Between Date and Time Columns in SharePoint

Bushra ParveenBushra Parveen Nov 2, 2026 868 views

Question details

The user needs to calculate the exact elapsed hours between separate Start Date, Start Time, End Date, and End Time columns in a SharePoint list.

How to Calculate Hours Between Date and Time Columns in SharePoint
Product
SharePoint
Device & OS
not provided
Scenario
Creating a calculated column in a SharePoint list to measure the time duration across multiple days.
Observed behavior
Subtracting time components directly yields incorrect results, such as returning 36 hours instead of 11 hours when the time period crosses midnight.
Before you start

Ensure that your Start Date, Start Time, End Date, and End Time columns are properly populated in your SharePoint list, and verify whether your site's regional settings use commas or semicolons for formulas.

Solution 1Recommended

Combine Date and Time Fields to Calculate Total Hours

Merge the date and time values into a single entity before calculating the difference to avoid calculation errors when time shifts across midnight.

SharePoint handles dates and times as numeric values. If your date and time values are kept in separate columns, subtracting the time columns individually will break when a shift crosses midnight. By mathematically combining the End Date and End Time, and subtracting the combined Start Date and Start Time, you get the exact fractional days elapsed. Multiplying this by 24 converts the result into hours.

1
Access List Settings

Navigate to your SharePoint list, click the gear icon in the top right corner, and select 'List Settings'.

2
Create a Calculated Column

Scroll down to the Columns section and click 'Create column'. Name your new column (e.g., 'Total Hours') and select 'Calculated (calculation based on other columns)' as the column type.

3
Enter the Subtraction Formula

In the Formula box, enter the following exact formula: =((EndDate+EndTime)-(StartDate+StartTime))*24 . Replace the column names with the exact names used in your list.

4
Format the Output

Under 'The data type returned from this formula is', choose 'Number'. Set the number of decimal places you wish to display (e.g., 2 for fractional hours).

5
Save the Column

Click 'OK' at the bottom of the page to apply the new calculated column to your SharePoint list.

Combine Date and Time Fields to Calculate Total Hours
Regional Formula Separators: If your SharePoint environment uses European or non-US regional settings, you may receive a syntax error. If this happens, replace any commas in your formulas with semicolons.
Free Microsoft Office alternative

Analyze SharePoint Exported Data Easily with WPS Office

While SharePoint lists require complex online calculated columns, you can export your data and perform advanced time tracking and date calculations much easier using WPS Spreadsheet. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office.

  1. 1. Export SharePoint Data: In your SharePoint list, click 'Export' and select 'Export to Excel' or 'Export to CSV'.
  2. 2. Open with WPS Spreadsheet: Launch WPS Office and open the downloaded spreadsheet file seamlessly.
  3. 3. Calculate Hours Offline: Use standard spreadsheet formulas like =((C2+D2)-(A2+B2))*24 and format the column as a Number to calculate hours instantly.
Fully compatible with Microsoft Excel formats (.xlsx, .csv) exported from SharePoint.Advanced built-in date and time functions for effortless hour calculations.Lightweight installation with lightning-fast performance.Familiar spreadsheet interface with zero learning curve for Office users.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my SharePoint calculated column show 36 hours instead of 11?

This happens when the formula calculates the date and time separately without properly grouping them. If a time period crosses midnight, the raw hour subtraction returns a negative or oversized number. Combining the date and time fields before subtracting them resolves this.

Should I use commas or semicolons in my SharePoint formula?

It depends on your SharePoint site's Regional Settings. US settings typically use a comma (,) to separate function arguments, while many European or international settings require a semicolon (;).

Can I use the DATEDIF function to calculate hours in SharePoint?

No, the DATEDIF function in SharePoint is only designed to calculate the difference in days, months, or years. To calculate hours, you must use standard mathematical subtraction and multiply the final result by 24.

What data type should the hour calculation column be set to?

The calculated column should be set to return a 'Number' data type rather than Date/Time. You can also specify the exact number of decimal places depending on whether you need to see fractional hours (like 8.5) or rounded hours.