Calculation Issues

How to Calculate Time by Subtracting Hours and Minutes in WPS Office Spreadsheet on Mac

Olivia MillerOlivia Miller Nov 13, 2026 870 views

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.

Calculate Time by Subtracting Hours and Minutes in WPS Office Spreadsheet on Mac
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.
Before you start

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.

Solution 1Recommended

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.

1
Open your workbook in WPS Office Spreadsheet

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.

2
Enter the MOD time subtraction formula

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.

3
Format the result as H:MM AM/PM

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.

4
Verify a midnight-crossing example

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 MOD formula to subtract hours and minutes from a starting time
Formula works for all Excel-compatible time values: If your hours and minutes are plain numbers instead of time values, use =MOD(A1-TIME(D1,C1,0),1) instead.
WPS Spreadsheet solution

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. 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. 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. 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. 4. Save in Excel-compatible format: Click Menu > Save As and keep the file as .xlsx so it remains compatible with Excel for Mac.
Free and lightweight Microsoft Excel alternative for MacSupports .xlsx and .xls files created in Excel for MacIncludes MOD and TIME functions for time subtraction calculationsFamiliar ribbon, number formats, and AM/PM time display
microsoft office alternative - wps office

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.