What Is the 24-Hour to 12-Hour Time Converter?
This tool converts time from the 24-hour clock (often called military time) into the familiar 12-hour format used in everyday life, complete with an AM or PM label. The 24-hour clock runs from 00:00 (midnight) to 23:59, while the 12-hour clock cycles 1–12 twice a day. This is a universal time-format conversion that works the same everywhere in the world.
How to Use It
Enter the hour as a number from 0 to 23 and the minute from 0 to 59. The calculator instantly returns the equivalent 12-hour time and tells you whether it falls in the AM (midnight to before noon) or PM (noon to before midnight) period.
The Formula Explained
The hour conversion uses the modulo operation: divide the 24-hour value by 12 and take the remainder. If the remainder is 0 (which happens at 0 and 12), the 12-hour value is 12. Otherwise the 12-hour value equals the remainder. For the period, any hour less than 12 is AM and any hour of 12 or greater is PM. Minutes never change between the two formats.
$$h_{12} = \begin{cases} 12 & h_{24} \bmod 12 = 0 \\ h_{24} \bmod 12 & \text{otherwise} \end{cases}, \quad \text{period} = \begin{cases} \text{AM} & h_{24} < 12 \\ \text{PM} & h_{24} \ge 12 \end{cases}$$
Worked Example
Take 13:30. The hour 13 modulo 12 equals 1, so the 12-hour value is 1. Since 13 is not less than 12, the period is PM. The result is 1:30 PM.
$$13 \bmod 12 = 1, \quad 13 \ge 12 \Rightarrow \text{PM} \Rightarrow 1{:}30\ \text{PM}$$Another example: 00:15 → 0 modulo 12 is 0, which maps to 12, and 0 is less than 12, so it is AM — giving 12:15 AM.
$$0 \bmod 12 = 0 \Rightarrow 12, \quad 0 < 12 \Rightarrow \text{AM} \Rightarrow 12{:}15\ \text{AM}$$FAQ
What is 12:00 in 24-hour time? Noon is 12:00 PM and midnight is 12:00 AM (which is 00:00 in 24-hour format).
Is 24:00 valid? No. The 24-hour clock runs 00:00–23:59. Midnight is written as 00:00, not 24:00.
Why does 12 stay as 12 in PM? Because \(12 \bmod 12 = 0\), and the convention maps a zero remainder back to 12 rather than 0, so noon shows as 12:00 PM.