How to Correct Excel Decimal Hour Calculations with CEILING
Question details
The user needs to correct inaccuracies in Excel when calculating time durations and converting them to decimal hours using the CEILING function.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating decimal hours for time durations (such as 17:30 to 18:30) and rounding to specific intervals like 15 minutes.
- Observed behavior
- Floating-point precision errors cause time durations to round incorrectly when converting to decimal hours using the standard CEILING function.
Ensure your start and finish time columns are formatted as Time (e.g., h:mm AM/PM) so the formula can correctly interpret the values as fractions of a day.
Use ROUND and CEILING to Fix Floating-Point Errors
By rounding the duration to the nearest minute before applying the CEILING function, you eliminate floating-point precision errors inherent in time calculations.
Excel stores time as fractions of a 24-hour day. When subtracting times, tiny floating-point discrepancies can occur, causing functions like CEILING to round up unexpectedly.
Multiplying the time difference by 1440 (the number of minutes in a day) and rounding to zero decimal places stabilizes the minute value before you apply the ceiling interval.
Click on the cell where you want the calculated decimal hours to appear.
Type the formula: =CEILING(ROUND(1440*([@[Finish Time]]-[@[Start Time]]),0),15)/60. Replace the column names with your actual cell references if you are not using an Excel Table.
Press Enter to apply the formula. The duration is now rounded to the nearest minute, forced to the next 15-minute interval, and converted back to decimal hours.
Right-click the cell, select Format Cells, choose Number, and set it to two decimal places to view the correct decimal hour (e.g., 1.25).

Calculate Time Accurately with WPS Spreadsheet
WPS Spreadsheet fully supports advanced time calculation formulas, including CEILING and ROUND, allowing you to track hours and payroll without precision errors.
- 1. Open your time-tracking workbook: Launch WPS Spreadsheet and open your .xlsx timesheet file.
- 2. Select the calculation cell: Click on the cell designated for your decimal hour result.
- 3. Input the formula: Type the combined CEILING and ROUND formula to calculate the exact duration.
- 4. Drag to apply: Press Enter and drag the fill handle downwards to apply the formula to the rest of your timesheet column.

Frequently Asked Questions
Why does Excel sometimes calculate 1 hour as 0.999999 hours?
Excel stores dates and times as serial numbers, where one day equals 1.0. Hours and minutes are fractions of this day. Converting these fractions into binary floating-point numbers can cause tiny precision errors, resulting in values like 0.999999 instead of exactly 1.
Can I round to the nearest 30 minutes instead of 15?
Yes. In the formula =CEILING(ROUND(1440*(End-Start),0),15)/60, simply change the number 15 to 30 to round the duration up to the nearest half-hour interval.
How do I handle calculations that cross midnight?
If your end time is past midnight, standard subtraction will result in a negative number. Modify your time difference calculation using the MOD function like this: MOD(End-Start, 1) before applying the ROUND and CEILING functions.




