FormulaCraft

How to convert military time to 12-hour format in Excel and Google Sheets

Excel & Google Sheets
=TEXT(A2/24,"hh:mm AM/PM")

Verified example

Computed by a real spreadsheet engine on the sample data below.

Military Time
1430
0945
2359
0000

=TEXT(A2/24,"hh:mm AM/PM")02:00 PM

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Enter your military time in a cell (e.g., 1430 for 2:30 PM).
  2. 2In another cell, use the formula provided to convert the military time to 12-hour format.
  3. 3Format the cell containing the formula as text if necessary.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What if my military time includes minutes?

Enter the time as a four-digit number (e.g., 1430 for 2:30 PM) and use the same formula.

Can I convert times directly from a colon-separated format?

Yes, but first remove the colon or replace it with nothing using a formula like SUBSTITUTE(A2,":","") before applying the conversion formula.

Why does the formula divide by 24?

Excel and Google Sheets treat dates and times as numbers, where one represents a full day. Dividing by 24 converts the hours into a fraction of a day.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: