SUM function - Microsoft Support
How do I add or subtract Times? You can add and subtract times in a few different ways. For example, to get the difference between 8:00 AM - 12:00 PM for payroll purposes you would use: =("12:00 PM"-"8:00 AM")*24, taking the end time minus the start time.Note that Excel calculates times as a fraction of a day, so you need to multiply by 24 to get the total hours.
Applies To: Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel for the web, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2019 for Mac, Excel 2016