Audited 31 Jul 2026·Last updated 28 Oct 2026·5 citations·Tier 1·0 uses

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

Conversion
Use 1–12 with AM/PM in the first mode, or 0–23 in the second.
AM or PM
Military time
1905
The time as a four-digit military group, hour 00–23 followed by minute 00–59, with no colon.
12-hour time
7:05 PM
24-hour clock hour
19
12-hour clock hour
7
Minute
5
Minutes after midnight
1,145 min

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.

hour24 = (hour12 mod 12) + (PM ? 12 : 0)

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.

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.

modeto24
periodPM
hour7
minute5

Frequently asked questions.

What time is 2300 on a 12-hour clock?
11:00 PM. Any hour from 13 to 23 converts by subtracting 12 and adding PM, so 1300 is 1 PM, 1700 is 5 PM, 2000 is 8 PM and 2300 is 11 PM. Hours 01 to 11 keep their number and take AM, 00 is the midnight hour, and 12 is the noon hour.
Should midnight be written 0000 or 2400?
NIST suggests 0000 for midnight at the beginning of a given date and 2400 for midnight at its end, so a shop open Friday until 2400 closes at the same instant as 0000 on Saturday. Without a date the two cannot be told apart, so the calculator works within a single day and uses 0000 only.
Is 12 PM noon or midnight?
By the common convention 12 PM is noon and 12 AM is midnight, and that is how the 12-hour result is labelled. NIST points out that the labels are strictly ambiguous, since p.m. means after noon and noon is not after itself. Writing 1200 for noon and 0000 for midnight removes the doubt.
How do you say military time out loud?
Read the digits in two pairs. 1905 is 'nineteen oh five' or, in US military style, 'nineteen zero five'. Whole hours use 'hundred': 1900 is 'nineteen hundred' and 0600 is 'zero six hundred', with the leading zero spoken. American military speech often adds 'hours', as in 'fourteen hundred hours'.
Is military time the same as Zulu time?
No. Military time is a format; Zulu is a time zone, Coordinated Universal Time, marked with a Z. Military messages combine them in a date-time group such as 271905Z OCT 26: the 27th, at 1905 UTC, October 2026. The other letters cover the remaining zones: A to M, skipping J, run eastward from UTC+1 to UTC+12, and N to Y run westward from UTC−1 to UTC−12. A four-digit time with no letter is usually local time, and the calculator does not change zones.
How do I work out the hours between two military times?
Convert both to minutes after midnight and subtract. If the result is negative the period crossed midnight, so add 1,440. A night shift from 2300 to 0700 gives 420 − 1,380 = −960, and −960 + 1,440 = 480 minutes, which is 8 hours. The hours-between-times calculator does this directly.
Why does 12:30 AM become 0030 rather than 1230?
The half hour after midnight belongs to hour 00, the first hour of the day, so its military form is 0030. 1230 is half past noon, 12:30 PM. Mixing the two up is the most frequent conversion mistake, and it puts an event twelve hours away from where it should be.
Is military time different from the 24-hour clock used outside the US?
The numbers are identical; only the punctuation differs. Most countries that use the 24-hour clock write a colon, 19:05, while American military and medical usage writes 1905 with no separator. Either form converts the same way, and you can type the hour and minute from either into the calculator.
Can I convert a time that includes seconds?
Only hours and minutes are entered, but seconds never change between the two clocks, so convert the hour and minute and put the seconds back on: 7:05:30 PM is 19:05:30. The four-digit military group itself carries no seconds, which is why it usually appears as a plain hour and minute.
Why do hospitals and pilots use the 24-hour clock?
A medication charted for 'eight' could mean 0800 or 2000, and a dropped AM or PM on a handover note doubles the room for error. Four digits leave no gap for that mistake. Aviation adds a single reference zone, UTC, so a flight that crosses several time zones is planned on one clock.

How this page was produced

Published by
Quanta Calculator
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
Coming soon