How to Calculate Time by Subtracting Hours and Minutes in WPS Office Spreadsheet on Mac
Question details
The user needs to subtract hours and minutes from a starting time in a spreadsheet and display the calculated result in 12-hour H:MM AM/PM format.

- Product
- WPS Office Spreadsheet / Excel for Mac
- Device & OS
- macOS
- Scenario
- A user is working in a spreadsheet on Mac with a starting time in one cell and separate hour and minute values to subtract.
- Observed behavior
- The result must be a valid time value that wraps correctly past midnight and displays with AM/PM formatting.
Confirm that the starting time, hours, and minutes are stored as Excel time values rather than text. In WPS Office Spreadsheet or Excel for Mac, check that the formula cells are formatted as Time before entering the calculation.
Use the MOD formula to subtract hours and minutes from a starting time
Use this method when the start time and the hours or minutes to subtract are entered as time values, especially if the result can pass midnight.
The MOD function returns the remainder after dividing by 1. Because Excel and WPS spreadsheets store one day as the value 1, wrapping the subtraction result with MOD keeps the answer within a valid 24-hour time range and avoids negative time errors.
Launch WPS Office on your Mac, click Menu in the top-left corner, choose Open, and select the workbook that contains the starting time, hours, and minutes.
Click the result cell and type =MOD(A1-C1-D1,1). Replace A1 with the starting time cell, C1 with the minutes time value, and D1 with the hours time value.
With the result cell selected, go to the Home tab, open the Number Format dropdown, choose More Number Formats, select Time, and pick a 12-hour format such as 1:30 PM.
Test with a starting time such as 1:00 AM minus 2:00: the formula should return 11:00 PM instead of a negative time or #####.

Use the TIME function when hours and minutes are plain numbers
Use this alternative when the hours to subtract are in one cell as a number like 2 and the minutes are in another cell as a number like 30.
Calculate time differences easily in WPS Office Spreadsheet
Open your Excel for Mac workbook in WPS Office Spreadsheet and use the same MOD and TIME formulas to subtract hours and minutes. You get familiar Excel-compatible calculations, time formatting, and .xlsx support without switching to a different workflow.
- 1. Open your Excel for Mac file in WPS Office Spreadsheet: Launch WPS Office on Mac, click Menu > Open, and select the .xlsx workbook containing your time data.
- 2. Enter the same time subtraction formula: Select the result cell and type =MOD(A1-C1-D1,1), or use =MOD(A1-TIME(D1,C1,0),1) for plain-number hours and minutes.
- 3. Format the result cell as H:MM AM/PM: Go to Home > Number Format, click More Number Formats, choose Time, and select the 1:30 PM format.
- 4. Save in Excel-compatible format: Click Menu > Save As and keep the file as .xlsx so it remains compatible with Excel for Mac.

Frequently Asked Questions
Why does my time subtraction show ##### or a negative time?
Excel and WPS spreadsheets use the 1900 date system by default, so negative time cannot display. Wrap the calculation in MOD: =MOD(A1-C1-D1,1) to return the equivalent positive time after midnight.
How do I enter hours and minutes to subtract?
For the MOD formula, enter them as time values such as 2:00 for two hours and 0:30 for thirty minutes. For plain numbers, use =MOD(A1-TIME(D1,C1,0),1).
How do I show the result as 1:30 PM instead of 13:30?
Select the result cell, go to Home > Number Format > More Number Formats > Time, and choose a 12-hour AM/PM time format.
Can I use this time calculation in WPS Office on Mac?
Yes. WPS Office Spreadsheet supports the same MOD and TIME formulas and can open and save .xlsx files from Excel for Mac.
What does the ,1 at the end of the MOD formula do?
It divides the subtraction result by 1 and returns the remainder. Since one day equals 1 in spreadsheet time, this wraps the result into a 24-hour range.




