Skip to content
Date & TimetimeUnited States only

Military Time Converter

Convert between 12-hour and 24-hour time. Midnight and noon are the cases that trip people: 12 AM is 00:00 and 12 PM is 12:00, which feels backwards.

Also called: 24 hour clock converter, am pm converter.

That hour is
If 12-hour, is it
24-hour time
14:30

14:30 in 24-hour time is 2:30 PM in 12-hour time. Neither midnight nor noon, so the conversion is unambiguous.

12-hour time
2:30 PM
Minutes past midnight
870
Spoken form
14 30 hours
On midnight and noon
Neither midnight nor noon, so the conversion is unambiguous.
Method and background

How this is calculated

Converting to 24-hour takes the hour modulo twelve and adds twelve for PM. The awkwardness is entirely at the two twelves: 12 AM is the start of the day at 00:00, and 12 PM is midday at 12:00, so the AM one is earlier despite the larger number. Many style guides recommend writing noon and midnight in words for exactly this reason.

twelve becomes zero before adding twelve for PM, which is why noon and midnight are the awkward cases
p
1 for PM, 0 for AM

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

half past two in the afternoon

Hour
14
Minute
30
That hour is
24-hour
If 12-hour, is it
PM

24-hour time14:30

arithmetic identity

Open this example

twelve AM is midnight

Hour
12
Minute
0
That hour is
12-hour
If 12-hour, is it
AM

24-hour time00:00

boundary: the case everyone gets wrong

Open this example

twelve PM is noon

Hour
12
Minute
0
That hour is
12-hour
If 12-hour, is it
PM

24-hour time12:00

boundary

Open this example

Method and limits

What it assumes

  • A 24-hour clock from 00:00 to 23:59.

What it deliberately does not model

  • 24:00 as an end-of-day marker is valid in ISO 8601 but is not produced here.

Formula version 1.0.0 · definition 1.0.0 · United States · Report a problem with this calculator

Frequently asked questions

Is 12 AM midnight or noon?
Midnight, the start of the day, written 00:00. 12 PM is noon. The convention is genuinely confusing, which is why timetables often write the words instead.