To calculate military time in Excel, use a formula that formats a time value as hh:mm with a 24‑hour clock, or convert a decimal number to hours and minutes with =INT(A1/100)&":"&MOD(A1,100). The exact approach depends on whether your data is already a time value, a decimal like 1430, or a text string such as "2:30 PM". This guide gives you the working formulas for each case, plus the formatting and arithmetic you need to add or subtract military times correctly.

What You'll Need

  • Excel for Windows, Mac, or Excel for the web (the formulas are the same; menu labels can differ slightly by version and region).
  • Your time data in one column, ideally with a clear header such as Start or End.
  • Basic familiarity with typing a formula and pressing Enter.

Step-by-Step

  1. Identify what kind of value you have. Click a cell and look at the formula bar. If it shows something like 2:30:00 PM, Excel treats it as a time value. If it shows 1430 with no colon, it is a number. If it shows "1430" with quotes or an apostrophe, it is text. The fix differs for each, so check first.
  2. Format a time value as military time. Select the cells, right‑click and choose Format Cells (or press Ctrl+1 on Windows, Cmd+1 on Mac). On the Number tab, choose Custom and type hh:mm in the Type box. Click OK. A value of 2:30 PM now displays as 14:30. Use hhmm if you want 1430 with no colon.
  3. Convert a decimal number to military time text. If A1 contains 1430, enter =TEXT(A1,"00\:00") to get 14:30, or =INT(A1/100)&":"&MOD(A1,100) to build the same string from the hours and minutes. The TEXT version is shorter and handles leading zeros automatically.
  4. Convert a decimal number to a real time value. Use =TIME(INT(A1/100),MOD(A1,100),0). This returns a true Excel time that you can add, subtract, and format with hh:mm. It is the safest choice if you plan to do arithmetic later.
  5. Convert a 12‑hour text string to military time. If A1 holds 2:30 PM as text, use =TEXT(TIMEVALUE(A1),"hh:mm"). TIMEVALUE reads the AM/PM and returns 14:30. If your locale uses a 24‑hour clock already, TIMEVALUE still works as long as the text is a valid time.
  6. Add or subtract military times. With real time values in A1 and B1, use =B1-A1 for elapsed time. Format the result as [h]:mm so totals over 24 hours do not wrap around. For example, 22:00 to 06:00 next day gives 8:00 with [h]:mm but shows 8:00 incorrectly as 8:00 AM if you use hh:mm.
  7. Handle overnight shifts. If the end time is earlier than the start time, add 1: =MOD(B1-A1,1). This treats the difference as a time of day and correctly returns the overnight duration. Format the cell as [h]:mm.
  8. Convert military time back to a decimal for payroll. Multiply the time value by 24: =A1*24. A 7:30 shift becomes 7.5 hours. Format the result as a number with two decimals.
  9. Check your results. Compare a few rows against a known clock. If a value looks wrong, inspect the formula bar to confirm whether Excel stored a time, a number, or text.

Common Mistakes

  • Typing 1430 without formatting. Excel stores it as the number one thousand four hundred thirty, not 2:30 PM. Use the conversion formulas above or enter times with a colon.
  • Using hh:mm for totals over 24 hours. The display wraps at midnight. Use [h]:mm for any sum of hours.
  • Forgetting that time is a fraction of a day. 6:00 AM is 0.25, not 6. Multiplying by 24 converts to decimal hours.
  • Leaving text that looks like time. A cell showing 14:30 may be text if it was imported. TIMEVALUE or a quick Text to Columns pass fixes it.
  • Subtracting across midnight without MOD. A negative result appears as ##### or a wrong value. Wrap the subtraction in MOD(...,1).

Tips

  • Keep raw data in one column and put formulas in a separate column so you can audit them.
  • Use =TEXT(A1,"hhmm") when you need a compact four‑digit string for IDs or exports.
  • Apply the hh:mm custom format to input cells before typing, so Excel recognises your entries as times.
  • For payroll, round to the nearest quarter hour with =MROUND(A1*24,0.25) if your policy requires it.
  • Name your ranges (Formulas > Define Name) to make long shift sheets easier to read.

Troubleshooting

  • Formula returns #VALUE!. The source cell is text that Excel cannot parse. Check for stray spaces with =TRIM(A1) and confirm the AM/PM marker matches your locale.
  • Result shows 0:00 or a date. The cell format is wrong. Apply hh:mm or [h]:mm via Format Cells.
  • Negative time shows #####. Use MOD for overnight differences, or enable the 1904 date system only if your workbook requires it (this shifts all dates, so avoid unless necessary).
  • Numbers like 1430 convert to 14:30 but arithmetic fails. TEXT returns a string. Use the TIME formula from step 4 when you need a real time value.
  • Imported data stays text. Select the column, use Data > Text to Columns, choose Delimited, then set the column type to Time. This rewrites the values as true times.

Frequently Asked Questions

How do I display 2:30 PM as 14:30?

Format the cell with the custom format hh:mm. The underlying value does not change; only the display does.

Can Excel add two military times directly?

Yes, if both are real time values. Format the total as [h]:mm so it can exceed 24 hours without wrapping.

Why does my overnight shift show a negative number?

Excel subtracts the smaller end time from the larger start time. Wrap the subtraction in MOD(end-start,1) to get the correct duration.

How do I convert 1430 to a decimal number of hours?

First convert to a time value with =TIME(INT(A1/100),MOD(A1,100),0), then multiply by 24. The result is 14.5.

Does military time work the same on Excel for the web?

Yes. The custom format and formulas are the same; only the location of Format Cells may differ slightly in the ribbon.

Can I enter 1430 and have Excel treat it as 2:30 PM automatically?

Not without a formula or a custom format applied first. Excel reads a bare 1430 as a number, so use the conversion formulas in this guide.