Calculateus

Military Time Converter

Convert between 12-hour clock time and 24-hour military time.

Result

Military Time
1515 hours

Military time drops the colon and AM/PM, using a 4-digit 24-hour format instead (3:15 PM becomes 1515 hours).

About the Military Time

This calculator converts times between standard 12-hour clock format with AM/PM and 24-hour military time. It's useful for reading schedules, travel itineraries, or logistics documents that use the 24-hour format, or for converting your own appointment times into military notation.

How It Works

You choose a conversion direction, enter an hour and minute, and if converting to military time, select AM or PM. Going from 12-hour to military time, the calculator maps the entered hour into the 0-23 range based on AM/PM and formats it as a 4-digit number followed by hours, dropping the colon. Going the other direction, it reads a 0-23 hour and derives both the correct AM/PM label and the equivalent 12-hour number.

To military: hour24 = (hour mod 12) + 12 if PM, else (hour mod 12); displayed as HHMM hours. To 12-hour: period = PM if hour >= 12, else AM; hour12 = 12 if (hour mod 12) = 0, else (hour mod 12)

Formula & Methodology

The hour-mod-12 step is what correctly handles the two edge hours of the 12-hour clock: entering 12 AM computes 12 mod 12 = 0, which stays 0 since there's no PM addition, giving 0000 hours for midnight; entering 12 PM computes the same 0, but adds 12 for PM, giving 1200 hours for noon. Going the other way, any 24-hour value from 13 to 23 is brought back into the 1-12 range through the same mod-12 operation, with the AM/PM label set separately based on whether the hour is 12 or greater.

Examples

12-Hour to Military

Entering 3:15 PM (hour 3, minute 15, period PM) converts to 1515 hours.

Military to 12-Hour

Entering 1500 hours (hour 15, minute 0) converts back to 3:00 PM.

Advantages

  • Correctly handles the midnight and noon edge cases, 12 AM and 12 PM, which are the two times people most often convert incorrectly by hand.
  • Works in both directions from a single tool, so separate calculators aren't needed for 12-hour-to-24-hour and 24-hour-to-12-hour conversions.
  • Formats output the way military and 24-hour schedules are actually written, as a 4-digit number followed by hours.

Common Mistakes

  • Assuming 12 PM (noon) becomes 0 in military time instead of 12, or that 12 AM (midnight) becomes 12 instead of 0.
  • Forgetting to drop the colon and AM/PM label when writing military time, instead of the standard 4-digit HHMM format.
  • Misreading afternoon military hours by not subtracting 12, for example reading 1700 as 7 PM instead of 5 PM.

Edge Cases to Watch For

  • The calculator does not validate that the entered hour fits its expected range for the chosen direction; for instance entering 18 while converting from 12-hour to military still computes a result, so hour and direction should be matched correctly.
  • Minutes are zero-padded to two digits but not validated to be under 60, so an out-of-range minute would display as entered rather than being corrected.
  • The mod-12 arithmetic correctly resolves both midnight (12 AM to 0000) and noon (12 PM to 1200), the two cases a naive hour-plus-12 rule would get wrong.

Common Use Cases

  • Travelers reading flight, train, or itinerary times listed in 24-hour format.
  • Military, aviation, medical, and logistics personnel who need to communicate times unambiguously across shifts.
  • Anyone scheduling or documenting events who needs to switch between a 12-hour and 24-hour written record.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

What time is 1500 hours?

1500 hours is 3:00 PM. To convert military hours 13-23 to 12-hour time, subtract 12 (15 − 12 = 3) and add PM; hours 00-12 map directly to AM/PM with 00 as 12 AM (midnight) and 12 as 12 PM (noon).

Conclusion

The conversion between 12-hour and military time hinges on correctly handling the hour-12 wraparound at midnight and noon, which this calculator applies automatically in both directions. That removes the most common source of manual conversion errors when reading or writing 24-hour schedules.