Military Time Calculator — 12-Hour and 24-Hour
Convert 12-hour AM/PM times to four-digit military time and back, with midnight as 0000, noon as 1200, and the minutes elapsed since midnight.
Military Time Calculator
Background.
What time is 1900? Seven in the evening. Every four-digit military time from 1300 up converts the same way: take 12 off the first two digits and call it PM, so 1900 is 7:00 PM, 2130 is 9:30 PM and 2359 is 11:59 PM, the last minute of the day. Going the other way, a PM hour from 1 to 11 gains 12, which is how 7:05 PM becomes 1905.
The notation counts the hours of the day straight through from 00 to 23 instead of running 1 to 12 twice, so there is no AM or PM to write down and none to forget. That is why it turns up wherever a misread time costs something: military orders, hospital medication charts, flight plans, railway timetables. Americans call the 24-hour clock military time and usually write it as four digits with no colon. In much of Europe and many other countries the same numbers are simply how clocks and tickets show the time, normally with a colon: 19:05.
Both of the hours that catch people out are twelves. Midnight, at the start of the day, is 0000, so half past midnight is 0030 and not 1230. Noon is 1200 and gets no extra 12, because adding 12 applies only to the hours from 1 PM to 11 PM. The US National Institute of Standards and Technology goes further and says the labels 12 a.m. and 12 p.m. are ambiguous and should not be used: a.m. and p.m. mean before and after noon, and noon itself is neither. Four digits remove the question.
The conversion runs in either direction and shows each answer in both notations, along with the number of minutes since midnight. It does not attach a date or a time zone. A bare 1905 is a reading on a clock, not a moment in UTC, and the gap between two times on either side of midnight is a duration problem, not a change of notation.
What is military time calculator?
Military time is the 24-hour clock written as a four-digit group: two digits for the hour, 00 to 23, then two for the minute, 00 to 59. The day starts at 0000, reaches noon at 1200 and ends at 2359; a minute later the count returns to 0000 on the next date. Leading zeros always stay, so 6:03 in the morning is 0603, never 603, and every time has the same width on a form or a screen.
The four digits name a time of day, not an amount of time. 1905 is a position on the clock and says nothing about how long anything took, and adding 0200 to 0300 is not a meaningful sum. Nor do the digits say which zone is meant. Military and aviation messages add a letter for that: Z, spoken as Zulu, marks Coordinated Universal Time, so 1905Z is 19:05 UTC, while J, Juliett, marks the local time of whoever reads it. With no letter, the time is local only by assumption.
Nor are the last two digits a decimal. 1905 is 19 hours and 5 minutes, which a timesheet in decimal hours records as 19 + 5 ÷ 60 = 19.0833. Reading the 05 as hundredths of an hour would turn five minutes into three, and errors of that kind add up quickly over a pay period.
Minutes after midnight express the same reading as a single count, from 0 at 0000 to 1,439 at 2359. In that form, ordinary subtraction gives the gap between two times on the same day.
How to use this calculator.
- Under 'Conversion', choose '12-hour to military time' when you start from something like 7:05 PM, or 'Military time to 12-hour' when you have four digits such as 1905.
- For 12-hour input, put the hour (1 to 12) in Hour and the minutes in Minute, then choose AM or PM. Midnight is hour 12 with AM; noon is hour 12 with PM.
- For military input, split the four digits: the first two go in Hour (0 to 23) and the last two in Minute, so 0745 is hour 7, minute 45. The AM or PM selector has no effect in this direction.
- Read the military time, the 12-hour time and the minutes after midnight together, and if anything looks off, check the twelves first. A time written as 2400 cannot be entered; it is the same instant as 0000 on the following day, so convert 0000 and carry the date yourself. Times copied from flight schedules or weather reports may carry a Z for UTC; change the zone separately, since the conversion keeps whatever zone the time was in.
The formula.
From 12-hour to 24-hour time, hour24 = (hour12 mod 12) + 12 for PM, or + 0 for AM. The mod 12 step has one job: it turns 12 into 0 and leaves 1 to 11 alone. That single operation settles both of the tricky twelves. 12 AM becomes 0 + 0 = 00, midnight; 12 PM becomes 0 + 12 = 12, noon; and every other PM hour gains 12, so 7 PM is 7 + 12 = 19. Minutes pass through unchanged, each part is padded to two digits, and the pairs are written side by side: 19 and 05 make 1905.
The reverse takes the 24-hour value mod 12 for the displayed hour, puts 12 in place of a remainder of 0, and labels hours 00 to 11 as AM and 12 to 23 as PM. So 00 reads 12 AM, 12 stays 12 PM, and 23 gives 23 mod 12 = 11, PM. The third figure, minutes after midnight, is hour24 × 60 + minute.
Arithmetic on the clock itself, as opposed to converting it, wraps at 24 rather than 12. Eight hours after 2000 is hour 28, and 28 − 24 = 4, so 0400 on the next day; three hours before 0100 is hour −2, and −2 + 24 = 22, so 2200 the previous evening. The calculator does not do these additions, but its minutes-after-midnight figure makes them easy: work in minutes, then add or subtract 1,440 whenever the total leaves the range 0 to 1,439.
Hours must be whole numbers in range, 1 to 12 for 12-hour input and 0 to 23 for military input, and minutes must run from 0 to 59. A fractional hour such as 7.5 is refused rather than read as 7:30, and 2400 is outside the range, because each time is treated as a point within one day and 2400 would be the same instant as the next day's 0000. The 12-hour result follows the everyday convention that 12 AM is midnight and 12 PM is noon. NIST considers those labels ambiguous, so on anything a stranger has to act on, write 'midnight' or 'noon' or keep the four digits.
A worked example.
A 7:05 PM appointment needs to go on a form that asks for military time. The hour is 7 and the period is PM, so the hour moves into the second half of the day: 7 mod 12 = 7, plus 12 for PM, gives 19. The minute stays 5, padded to 05, and the two pairs side by side read 1905, said aloud as 'nineteen oh five' or 'nineteen zero five'. Minutes after midnight come from the same hour: 19 × 60 = 1,140, plus 5, gives 1,145. That count is what makes durations easy. A shift that began at 0700, which is 7 × 60 = 420 minutes after midnight, and ends at 1905 lasts 1,145 − 420 = 725 minutes, and 725 ÷ 60 is 12 remainder 5, so 12 hours and 5 minutes. The 12-hour line in the results reads 7:05 PM, the time that went in, which confirms the round trip.
Frequently asked questions.
What time is 2300 on a 12-hour clock?
Should midnight be written 0000 or 2400?
Is 12 PM noon or midnight?
How do you say military time out loud?
Is military time the same as Zulu time?
How do I work out the hours between two military times?
Why does 12:30 AM become 0030 rather than 1230?
Is military time different from the 24-hour clock used outside the US?
Can I convert a time that includes seconds?
Why do hospitals and pilots use the 24-hour clock?
References& sources.
- [1]NIST Times of Day FAQs explains the ambiguity of 12 a.m./p.m. and clearer midnight/noon notation.
- [2]IETF RFC 3339 section 5.6 defines hour 00–23 and minute 00–59 in an interoperable time grammar.
- [3]BIPM SI Brochure documents accepted time-of-day notation and distinguishes it from duration.
- [4]FAA Aeronautical Information Manual illustrates four-digit time groups with explicit UTC context.
- [5]U.S. Government Publishing Office Style Manual provides an independent federal time-notation style reference.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 5 cited below
- Method
- hour24 = (hour12 mod 12) + (PM ? 12 : 0)
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled