Under the surface, Excel and Google Sheets do not store times the way they show them. A spreadsheet stores a time as a fraction of a day: noon is 0.5, 6:00 PM is 0.75, and 1430 - 2:30 PM - is about 0.604. The display is a costume the number wears, and the costume is called a format. Once you understand that, military time in a spreadsheet stops being a fight. You are never converting the value; you are only choosing how it dresses.
That single idea explains every trick in this guide. A cell showing 2:30 PM and a cell showing 14:30 can hold the exact same number, and formulas cannot tell them apart. So the work splits into two jobs: getting times in cleanly, and formatting them the way your readers expect.
Entering and displaying military time
Typing a time with a colon - 14:30, 8:05, 23:45 - is all it takes for either program to recognize a time. The display may come back in 12-hour dress with an AM or PM attached, depending on your settings. To fix the dress: select the cells, open the custom number format, and enter hh:mm. In Excel that is Format Cells, then Custom. In Google Sheets it is Format, Number, Custom number format. With hh:mm applied, 2:30 PM displays as 14:30 and 12:05 AM displays as 00:05 - midnight gets its proper zero hour, which is the detail most people actually need from the format.
If you need the military time as text - for a report, an export or a label - the TEXT function prints it: =TEXT(A1,"hh:mm") returns the characters 14:30. Remember that the result is text now, not a number wearing a costume, so it will display beautifully and refuse to do arithmetic. Keep the real time in its own column and let TEXT make the pretty copy. To check a conversion by hand while you build a sheet, our military time converter sits one tab away.
The conversion formulas that matter
| Job | Formula or format | Example |
|---|---|---|
| Show a time in military format | Custom format hh:mm | 2:30 PM shows as 14:30 |
| Print military time as text | =TEXT(A1,"hh:mm") | Returns the text 14:30 |
| Four-digit number to a real time | =TIME(INT(A1/100),MOD(A1,100),0) | 1430 becomes 14:30 |
| Time to decimal hours | =A1*24 | 08:45 becomes 8.75 |
| Decimal hours to a time | =A1/24, formatted hh:mm | 8.75 becomes 08:45 |
| Total longer than a day | Custom format [h]:mm | 26 hours shows as 26:00 |
The four-digit formula deserves a word, because punch-clock exports love sending times as bare numbers like 1430. INT(A1/100) takes the 14, MOD(A1,100) takes the 30, and TIME assembles them into a genuine time the sheet can calculate with. Run it down a helper column and an entire imported roster becomes computable. The decimal pair, multiply or divide by 24, is the bridge to payroll, since pay is calculated in decimal hours while clocks report in hours and minutes. Our time calculator handles the same conversions for one-off checks.
Adding times and the 24-hour wall
Adding times is plain addition - an end time minus a start time gives a duration, and durations add down a column like anything else. The trap is display. Add up a week of shifts and the total is often 26, 38 or 45 hours, but a cell formatted hh:mm wraps at 24 and cheerfully shows 02:00, 14:00 or 21:00. The stored value is correct the whole time; only the costume fails. Format total cells as [h]:mm - the square brackets order the program to count every hour - and 26 hours reads as 26:00. Every timesheet template that has ever "lost" a day of work has this bug in it somewhere.
Overnight shifts need one more nudge. An end time of 06:15 minus a start of 22:45 gives a negative number, which time formats cannot show. Add 1 (a full day) when the end is earlier than the start: =B1-A1+(B1<A1). The bracket term quietly adds the day only on overnight rows, and the same formula then works for the whole roster.
While you build a sheet like this, verify the first few rows by hand against the military time converter before you trust the formulas with the whole roster. A format error copied down two hundred rows is still one error, but it is one error with two hundred victims. Three checked rows at the start are cheap insurance, and once they agree with the converter to the minute, the sheet is safe to fill.
Mistakes that break timesheet math
Three errors account for nearly every broken time sheet I have seen. First, typing 1430 as a number and expecting time behavior - it is one thousand four hundred thirty until the TIME formula rescues it. Second, mixing text and values: a column where some times came from TEXT formulas will sort strangely and sum to nonsense in patches. Third, locale surprises - some systems expect a period or a space instead of a colon, so an imported file's "times" arrive as text strings that look perfect and calculate as zero. The test is brutal and quick: add two cells. If the answer is 0 or an error, at least one of them is text in a time costume. Fix the input, and the rest of the sheet usually heals itself. More spreadsheet and clock guidance lives in the guides.
Frequently asked questions
How do I format a cell for military time in Excel?
Select the cells, open Format Cells, choose Custom, and enter hh:mm. Excel stores times as fractions of a day, and this format displays them on the 24-hour clock - a value typed as 2:30 PM will show as 14:30, and 14:30 typed directly stays 14:30.
Why does my total show 02:00 instead of 26:00?
The normal hh:mm format wraps at 24 hours, so a 26-hour total displays as 02:00 even though the stored value is right. Change the total cell to the custom format [h]:mm - the brackets tell Excel to count all the hours, and the same cell will show 26:00.
Can I type 1430 and have Excel read it as a time?
Not directly - typed as 1430, Excel sees the number one thousand four hundred thirty. Either type the colon (14:30) or convert a column of four-digit numbers with the formula =TIME(INT(A1/100),MOD(A1,100),0), which splits 1430 into 14 hours and 30 minutes.
How do I convert decimal hours to military time in a spreadsheet?
Divide the decimal by 24 and format the result as hh:mm. If 8.75 sits in cell A1, the formula =A1/24 formatted as hh:mm shows 08:45 - eight hours forty-five. The reverse trip, from a time to decimal hours, is =A1*24.
Does Google Sheets use the same military time formats?
Yes. Sheets accepts the same hh:mm custom format under Format, Number, Custom number format, the TEXT function behaves the same way, and [h]:mm works for totals over 24 hours. Files moved between Excel and Sheets keep these formats intact.
Johnson Ramzan builds and maintains every calculator on Time Calculator Tools himself, and he tests each one against worked examples he has done by hand before it is allowed near a reader. His guides follow US Department of Labor guidance on hours worked, overtime and rounding, and he writes them the way he would want a payslip explained to him: plain English, real numbers, and no step skipped. When a reader writes in with a shift pattern the tools handle badly, fixing it goes to the top of his list.
Last updated: November 16, 2026
Related guides
How to Convert Military Time for Payroll
From punch times to decimal hours to a gross pay figure - the full payroll path for 24-hour times, with the 8.45 trap exposed.
Read the guideMilitary Time on Time Cards and Punch Clocks
How punch clocks stamp 24-hour times, how those stamps land on a paper card, and how to total a card stamped in military time.
Read the guideHow to Convert Standard Time to Military Time
The add-12 rule and its three exceptions, with a worked table for the hours people convert most.
Read the guideMilitary Time Practice Questions
Thirty questions with a full answer key, from simple readings to shift problems, so you can test the conversion rules yourself.
Read the guide