The 24-hour clock counts the hours of the day from 00 to 23, with no a.m. or p.m. So 2:30 p.m. is written 14:30. To change 24-hour time to 12-hour time, subtract 12 from any hour above 12 and add p.m. Hour 00 becomes 12 a.m. (midnight), and 12 stays 12 p.m. (noon).
You see it on train timetables, and in the US it is often called military time. It is used on tickets, timetables, computer logs and phone settings around the world. This guide gives you a full conversion chart, two quick tricks, the honest answer on noon and midnight, and how to switch formats on your phone, in Excel and in code.

- 00:00 = 12:00 a.m. (midnight, start of the day)
- 09:15 = 9:15 a.m.
- 12:00 = 12:00 p.m. (noon)
- 14:30 = 2:30 p.m.
- 23:59 = 11:59 p.m. (the last minute of the day)
24-hour to 12-hour conversion chart
The minutes never change. Only the hour and the a.m. or p.m. label change.
| 24-hour | 12-hour | 24-hour | 12-hour |
|---|---|---|---|
| 00:00 | 12:00 a.m. (midnight) | 12:00 | 12:00 p.m. (noon) |
| 01:00 | 1:00 a.m. | 13:00 | 1:00 p.m. |
| 02:00 | 2:00 a.m. | 14:00 | 2:00 p.m. |
| 03:00 | 3:00 a.m. | 15:00 | 3:00 p.m. |
| 04:00 | 4:00 a.m. | 16:00 | 4:00 p.m. |
| 05:00 | 5:00 a.m. | 17:00 | 5:00 p.m. |
| 06:00 | 6:00 a.m. | 18:00 | 6:00 p.m. |
| 07:00 | 7:00 a.m. | 19:00 | 7:00 p.m. |
| 08:00 | 8:00 a.m. | 20:00 | 8:00 p.m. |
| 09:00 | 9:00 a.m. | 21:00 | 9:00 p.m. |
| 10:00 | 10:00 a.m. | 22:00 | 10:00 p.m. |
| 11:00 | 11:00 a.m. | 23:00 | 11:00 p.m. |

Many analogue clocks show the hours in Roman numerals instead, often with IIII for 4.
How to convert 24-hour time to 12-hour time
Look at the hour (the first two digits) and follow these rules:
- Hour is 00: change it to 12 and add a.m. So 00:45 is 12:45 a.m.
- Hour is 01 to 11: keep it, drop any leading zero and add a.m. So 07:05 is 7:05 a.m.
- Hour is 12: keep it and add p.m. So 12:20 is 12:20 p.m.
- Hour is 13 to 23: subtract 12 and add p.m. So 18:40 is 6:40 p.m.
A quick trick for afternoon and evening hours
If you find subtracting 12 slow, look only at the last digit of the hour:
- 13 to 19: take the last digit and subtract 2. For 17, 7 − 2 = 5, so 17:00 is 5 p.m.
- 20 to 23: take the last digit and add 8. For 22, 2 + 8 = 10, so 22:00 is 10 p.m.
Both shortcuts give the same answer as subtracting 12. We checked every hour from 13 to 23.
How to convert 12-hour time to 24-hour time
- a.m. times from 1 to 11: keep the hour and add a leading zero if needed. 8:30 a.m. is 08:30.
- 12 a.m. (midnight): write 00. 12:15 a.m. is 00:15.
- 12 p.m. (noon): keep 12. 12:15 p.m. is 12:15.
- p.m. times from 1 to 11: add 12. 4:50 p.m. is 16:50.
Always use two digits for hours and minutes, so 9:05 a.m. becomes 09:05, not 9:5. This matches the ISO 8601 standard, which uses the 24-hour clock with two-digit hours.

Is 12 a.m. midnight or noon?
By the usual convention, 12 a.m. is midnight and 12 p.m. is noon. Phones, computers and the conversion rules above all follow it. But the US National Institute of Standards and Technology (NIST), which keeps official time in the US, says “12 a.m. and 12 p.m. are ambiguous and should not be used.”
NIST’s reason is simple. “a.m.” means before noon and “p.m.” means after noon. Noon itself is neither, so neither label is strictly right. Midnight is both 12 hours before noon and 12 hours after it.
The 24-hour clock removes the problem. 12:00 is always noon. 00:00 is always midnight. If you must use 12-hour time, write “12 noon” and “12 midnight”, or follow NIST’s advice for contracts and insurance papers: use 11:59 p.m. or 12:01 a.m. so no one can misread the day.
00:00 or 24:00: which is midnight?
Both, at different ends of the day. 00:00 is midnight at the start of a day. 24:00 is midnight at the end of a day. They are the same instant, so 24:00 on Monday equals 00:00 on Tuesday.
NIST recommends this exact pair: 0000 for the start of a date and 2400 for its end. The international date-and-time standard agrees. Amendment 1 to ISO 8601-1, published in 2022, defines 24:00:00 as the “ending of the day”. Its own example says the period 2022-04-19T00:00:00 to 2022-04-19T24:00:00 means the same as midnight to midnight, 19 to 20 April.
In daily life, 24:00 is mostly used for closing times, like a shop that is “open 08:00–24:00”. Most digital clocks never show it. They go from 23:59 straight to 00:00.

The date trap: what day is 00:30?
A train or flight at 00:30 on 6 October leaves 30 minutes after midnight, in the night between 5 and 6 October. If you think of it as “Monday night”, you may turn up a whole day late.
The rule is simple: any time from 00:00 to 00:59 already belongs to the new date. When you book late-night travel, check the date and the hour together.
Military time: how it is written
“Military time” is a name used mainly in the US for the 24-hour clock. The hours are the same, but the time is often written as four digits with no colon, such as 0600 for 6 a.m. and 1830 for 6:30 p.m. Conversion works the same way: 1830 minus 1200 is 630, so 6:30 p.m.
Some military and technical times end with a letter for the time zone. “Z” stands for UTC, often read as Zulu time. You can read more about it in our guide to GMT vs UTC.
Which countries use the 12-hour clock?
Most places default to the 24-hour clock, but a large group defaults to 12-hour time. We counted it in the Unicode CLDR database (version 48), the shared data that phones and computers use to pick a default time format for each region.
Out of 250 regions and territories listed, 104 default to the 12-hour clock and 146 default to the 24-hour clock.
| Default 12-hour (examples) | Default 24-hour (examples) |
|---|---|
| India | United Kingdom |
| United States | Ireland |
| Canada | France, Germany, Italy, Spain |
| Australia, New Zealand | Russia |
| Pakistan, Bangladesh | Sri Lanka, Nepal |
| Philippines, Malaysia, Singapore | Indonesia |
| Saudi Arabia, UAE, Egypt | China, Japan |
| South Korea | Brazil |
| Mexico | South Africa, Nigeria, Kenya |
A default is not a rule. In the same data, 236 of the 250 regions allow both formats, including India, the US and the UK. Even in 12-hour regions, timetables often use the 24-hour clock, because a wrong a.m. or p.m. can make someone miss a train. IRCTC’s published list of Indian Railways trains, for example, shows departures such as 22:45 and 00:10. A few regions, such as Russia and Indonesia, list only the 24-hour format.
How to switch to the 24-hour clock on your phone
iPhone
Apple’s iPhone User Guide gives these steps: open Settings, tap General, tap Date & Time, then turn 24-Hour Time on or off.
Android
Google’s Android Help gives these steps for the Clock app: open Clock, tap More, then Settings, then Change date & time, and turn on Use 24-hour format. Menu names can differ a little on phones from other makers, such as Samsung.
How to show 12-hour or 24-hour time in Excel
Excel decides by one thing: whether the format code contains AM/PM. Microsoft’s help page says that if the format contains AM or PM, Excel uses the 12-hour clock. Otherwise, it uses the 24-hour clock.
- 24-hour: format the cell as
hh:mm, or use=TEXT(A1,"hh:mm"). - 12-hour: format the cell as
h:mm AM/PM, or use=TEXT(A1,"h:mm AM/PM").
To change formats, select the cells, open Format Cells, choose Custom, and type the code.
How to convert in code
Most languages use the same letters for this. In Python, %H gives the 24-hour hour and %I with %p gives the 12-hour hour with AM or PM:
from datetime import datetime
t = datetime(2026, 10, 5, 14, 30)
t.strftime("%H:%M") # '14:30'
t.strftime("%I:%M %p") # '02:30 PM'
We ran this code. Note that %I keeps a leading zero (02, not 2), and that 00:05 prints as 12:05 AM. Computer systems often store time as a single number instead, such as a Unix timestamp, and only turn it into 12-hour or 24-hour text when they show it.
Common mistakes
- Writing 12:30 a.m. as 12:30. 12:30 in 24-hour time is just after noon. Half past midnight is 00:30.
- Adding p.m. to a 24-hour time. “15:00 p.m.” repeats itself. Write 15:00 or 3:00 p.m.
- Writing hours above 23. 25:00 is not a valid clock time. The only special case is 24:00 for the end of a day.
- Dropping the leading zero. 9:05 should be 09:05 in 24-hour format, so times line up and sort correctly.
- Forgetting the date change. 00:15 on the 6th is late on the night of the 5th.
Clocks can also jump by an hour twice a year in some countries. Our guide to daylight saving time explains when that happens and why India does not change its clocks.

Frequently asked questions
What is 1500 in normal time?
3:00 p.m. Subtract 12 from 15 to get 3, then add p.m.
What is 7 p.m. in 24-hour time?
19:00. For p.m. times from 1 to 11, add 12 to the hour.
Is 00:00 a.m. or p.m.?
00:00 is midnight at the start of the day, usually written 12:00 a.m. To avoid any doubt, write “12 midnight” or simply 00:00.
Why is it called military time?
In the US, most people use the 12-hour clock in daily life, while the armed forces use the 24-hour clock. So Americans often call it military time. In most other countries it is simply the normal 24-hour clock.
Does India use the 12-hour or the 24-hour clock?
Both. In everyday speech and on most phones, India uses the 12-hour clock, which is the default in Unicode CLDR data for India. Train times are printed in 24-hour format: IRCTC’s train lists show times such as 22:45 and 00:10.
How many hours are there on a 24-hour clock?
24, numbered 00 to 23. That adds up to 1,440 minutes or 86,400 seconds a day, or 8,760 hours in a normal year. See how many hours are in a year for the leap-year figure.