logo
search
Calculation Issues

Convert 24-Hour Time to 12-Hour Values in Excel (Fix Noon Errors)

Guest WriterGuest Writer Oct 1, 2026 869 views

Question details

The user needs to convert 24-hour time values (e.g., 13:00) into 12-hour values (e.g., 1:00) using a formula, without relying on AM/PM indicators.

How to Convert 24-Hour Times to 12-Hour Values in Excel
Product
Excel
Device & OS
not provided
Scenario
Calculating and modifying time formats in a spreadsheet where specific time increments are added, requiring the results to be displayed as customized 12-hour numeric values.
Observed behavior
Standard subtraction formulas produce incorrect results or calculation errors around noon (from 12:01 to 12:19) or when the calculated time passes midnight.
Before you start

Ensure the original time data in your cells is formatted as a valid Excel Time or Custom format, rather than plain text, so the formula can calculate the serial values correctly.

Solution 1Recommended

Use the IF and TIME Formula for Accurate Conversion

This method reliably subtracts 12 hours only from times at or after 13:00, keeping noon times (12:00 to 12:59) perfectly intact without negative value errors.

Excel handles times as fractional parts of a 24-hour day. Using the built-in TIME function prevents errors that occur when manually subtracting decimal equivalents like 0.5.

1
Select a blank cell for the result

Click on a blank cell where you want the converted 12-hour time to appear (for example, B1).

2
Enter the conditional subtraction formula

Type the formula =IF(A1>=TIME(13,0,0),A1-TIME(12,0,0),A1) into the formula bar and press Enter.

3
Open the Format Cells dialog

Right-click the cell containing your new formula and select Format Cells from the context menu.

4
Apply Custom time formatting

Navigate to the Custom category, type h:mm in the Type box, and click OK. This ensures 13:00 displays purely as 1:00 without any AM/PM indicator.

Use the IF and TIME Formula for Accurate Conversion
Handling Blank Cells: If your source column has empty cells, you can wrap the formula to ignore them: =IF(ISBLANK(A1), "", IF(A1>=TIME(13,0,0),A1-TIME(12,0,0),A1)).
Seamless Spreadsheet Calculations

Handle Time Conversions Seamlessly in WPS Spreadsheet

WPS Spreadsheet provides robust formula logic and flexible custom formatting, making complex time data conversions—like 24-hour to 12-hour math—straightforward and accurate.

  1. 1. Open your time data in WPS Spreadsheet: Launch WPS Office, select Spreadsheet, and open the workbook containing your 24-hour time values.
  2. 2. Apply the conversion formula: Click a blank cell next to your time data and enter =IF(A1>=TIME(13,0,0),A1-TIME(12,0,0),A1).
  3. 3. Format the output as h:mm: Right-click the result, choose Format Cells, go to Custom, input h:mm, and click OK to strip away AM/PM.
  4. 4. Batch convert remaining cells: Click and hold the small square at the bottom right of the cell, then drag it down to convert all other 24-hour times instantly.
100% compatible with Microsoft Excel time formulas (IF, TIME, MOD).Advanced Custom Cell Formatting supports identical syntax like h:mm.Lightweight architecture ensures ultra-fast calculations on large time-log datasets.Free to download and provides a highly intuitive, familiar user interface.
QA img-9

Frequently Asked Questions

Why does subtracting 0.5 directly from time cause errors around 12:00 PM?

Spreadsheet software treats dates and times as serial numbers, where 1 whole day equals 1.0 and 12 hours equals 0.5. Directly subtracting 0.5 without checking if the time is strictly greater than 12:59 causes noon values (12:00 to 12:59) to either turn negative or flip incorrectly to midnight, breaking calculations.

How do I visually display 12-hour time with AM or PM without changing the cell value?

If you do not need to perform mathematical subtractions and only want to change how the 24-hour time is displayed, you do not need a formula. Just right-click the cell, select Format Cells, navigate to the Custom category, and enter the format code: h:mm AM/PM.

What is the purpose of the TIME function in this formula?

The TIME(hour, minute, second) function converts human-readable times into their exact decimal serial numbers. Using TIME(13,0,0) instead of guessing the decimal equivalent for 1:00 PM ensures your conditional formulas work perfectly across all regional settings and operating systems.