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}$$Key Terms: Midnight, Noon, AM and PM
- 24-hour clock (military time)
- A system that counts hours from 0 to 23 and needs no AM or PM label. The day starts at 00:00 and ends at 23:59. It is common in the military, aviation, healthcare, transport timetables and many countries' everyday use.
- 12-hour clock
- A system that splits the day into two periods of 12 hours each. Hours run 12, 1, 2, … 11, and an AM or PM label says which half of the day it is.
- AM (ante meridiem)
- Latin for "before midday". It covers times from midnight up to, but not including, noon (12:00 AM to 11:59 AM).
- PM (post meridiem)
- Latin for "after midday". It covers times from noon up to, but not including, midnight (12:00 PM to 11:59 PM).
- Midnight
- The start of the day: 00:00 in 24-hour time, written 12:00 AM in 12-hour time. Some schedules write 24:00 for the end of a day, which is the same instant as 00:00 of the next day.
- Noon
- The middle of the day: 12:00 in 24-hour time, written 12:00 PM in 12-hour time.
- Modulo (mod)
- The remainder after division. In the formula, \(\text{Hour} \bmod 12\) gives the remainder when the hour is divided by 12. For example, \(15 \bmod 12 = 3\) and \(12 \bmod 12 = 0\). Because a remainder of 0 should display as 12, the converter replaces 0 with 12.
Note on labeling: Calling noon "12 PM" and midnight "12 AM" is a convention, not a logical necessity. Because the labels confuse many people, writing "noon" or "midnight" (and, for midnight, naming the date) avoids ambiguity on schedules, tickets and contracts.
How to Convert by Hand
Look at the hour (0–23) and follow these steps:
- Hour is 0: write 12 and use AM. Example: 00:30 → 12:30 AM.
- Hour is 1–11: keep the hour as it is and use AM. Example: 09:15 → 9:15 AM.
- Hour is 12: keep 12 and use PM. Example: 12:45 → 12:45 PM.
- Hour is 13–23: subtract 12 from the hour and use PM. Example: 18:20 → \(18 - 12 = 6\) → 6:20 PM.
- Minutes: keep them unchanged in every case.
Shortcut: subtract 12 for hours after noon (13 and above). Hours 1–11 stay the same, and the two special cases are 0 → 12 AM and 12 → 12 PM.
More examples: 23:59 → \(23 - 12 = 11\) → 11:59 PM; 13:00 → 1:00 PM; 07:05 → 7:05 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.