Date & Time

Military Time Converter

Convert between 24-hour military time and standard 12-hour AM/PM time.

Formula and sources updated · Data sources · 1View algorithm, constants and default inputs (JSON)

Enter your values

Result 2:30 PM
Results

Result

ResultResult: 2:30 PM / 24-hour format: 14:30 / 12-hour format: 2:30 PM / Minutes from midnight (min): 870Result2:30 PM=24-hour format14:30=12-hour format2:30 PM=Minutes from midnight (min)870

About this calculator

Enter a valid 24-hour time such as 14:30 or a 12-hour time with AM/PM such as 2:30 PM. The converter rejects out-of-range hours and minutes.

Worked example

calculated with the default values below

Time (e.g. 14:30 or 2:30 PM) 14:30 · Direction 24-hour to 12-hour Result 2:30 PM · 24-hour format 14:30 · 12-hour format 2:30 PM · Minutes from midnight 870 min

Method and assumptions

min = 60h₂₄ + m; h₁₂ = {12, h₂₄ mod 12 = 0; h₂₄ mod 12, h₂₄ mod 12 ≠ 0}; L = {AM, h₂₄ < 12; PM, h₂₄ ≥ 12} Rules: PM adds 12 when h < 12; AM at 12 becomes 0. Output is zero-padded hh:mm. Enter a valid 24-hour time such as 14:30 or a 12-hour time with AM/PM such as 2:30 PM. The converter rejects out-of-range hours and minutes. The references explain definitions and methods; any extra preset must be checked against the assumptions on this page.

Data sources

The references explain definitions and methods; any extra preset must be checked against the assumptions on this page.

Disclaimer

These calculators give general date results. Public holidays, working-day conventions and time-zone rules are set locally and change, so confirm against the official calendar for anything legally or contractually binding.

Maintained by: CalcDelta Formula and sources updated ·

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

min = 60h₂₄ + m; h₁₂ = {12, h₂₄ mod 12 = 0; h₂₄ mod 12, h₂₄ mod 12 ≠ 0}; L = {AM, h₂₄ < 12; PM, h₂₄ ≥ 12}

h₂₄
hour 0–23
h₁₂
hour 1–12
m
minute 0–59
min
minutes from midnight
L
AM/PM label

Rules: PM adds 12 when h < 12; AM at 12 becomes 0. Output is zero-padded hh:mm.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Why does 12:00 AM convert to zero hundred hours, not twelve hundred?

The converter treats 12 AM as midnight, rolling the hour to 0, while 12 PM noon stays 12. Internally it adds 12 to PM hours below 12 and sets 12 AM to 0, so 12:30 AM becomes 0030 and 12:30 PM becomes 1230. The Minutes from midnight output is simply hour times 60 plus minute, which is why 0000 reads 0 minutes and noon reads 720. This is the single rule most people get wrong when first reading a 24-hour clock.

Which inputs and limits apply to Military Time Converter?

Use the units shown beside each field. These are form limits, not recommended settings. min = 60h₂₄ + m; h₁₂ = {12, h₂₄ mod 12 = 0; h₂₄ mod 12, h₂₄ mod 12 ≠ 0}; L = {AM, h₂₄ < 12; PM, h₂₄ ≥ 12} Rules: PM adds 12 when h < 12; AM at 12 becomes 0. Output is zero-padded hh:mm. Enter a valid 24-hour time such as 14:30 or a 12-hour time with AM/PM such as 2:30 PM. The converter rejects out-of-range hours and minutes. The references explain definitions and methods; any extra preset must be checked against the assumptions on this page.

What is a complete worked example for Time (e.g. 14:30 or 2:30 PM) = 14:30; Direction = 24-hour to 12-hour?

Inputs: Time (e.g. 14:30 or 2:30 PM) = 14:30; Direction = 24-hour to 12-hour. Calculation: min = 60h₂₄ + m; h₁₂ = {12, h₂₄ mod 12 = 0; h₂₄ mod 12, h₂₄ mod 12 ≠ 0}; L = {AM, h₂₄ < 12; PM, h₂₄ ≥ 12}. Results: Result = 2:30 PM; 24-hour format = 14:30; 12-hour format = 2:30 PM; Minutes from midnight = 870 min.