Skip to content

Roman Numeral Converter

Pair

2024 ↔ MMXXIV

Estimates for educational purposes — not financial, medical, or legal advice. See terms.

Bidirectional converter between Arabic numerals (1 through 3999) and their Roman numeral equivalents. Both inputs are live: edit either side and the other updates. Uses canonical subtractive notation for the Roman output (IV, IX, XL, XC, CD, CM), and accepts both canonical and non-canonical forms when parsing.

The Roman numeral symbols

The seven letters of Roman numerals:

  • I = 1
  • V = 5
  • X = 10
  • L = 50
  • C = 100
  • D = 500
  • M = 1000

Numbers are built by concatenating these in descending order, with subtractive pairs for 4, 9, 40, 90, 400, and 900.

How the output is constructed

The tool uses a greedy algorithm with a precomputed lookup table in descending order:

1000 (M), 900 (CM), 500 (D), 400 (CD), 100 (C), 90 (XC), 50 (L), 40 (XL), 10 (X), 9 (IX), 5 (V), 4 (IV), 1 (I).

Starting from the target number, it repeatedly takes the largest value that fits, appends the corresponding symbol, and subtracts. This greedy traversal produces the canonical subtractive form every time — no backtracking needed, because the value set was designed to be greedy-optimal.

Example: 2024

2024 ≥ 1000 → append M, remaining 1024. Repeat: M, remaining 24. 24 < 1000, 900, …, 50, 40 → skip. 24 ≥ 10 → append X, remaining 14. Repeat: X, remaining 4. 4 ≥ 4 → append IV. Final: MMXXIV.

Example: 1999

The classic test case. Greedy: M (remaining 999), CM (99), XC (9), IX (0). Result: MCMXCIX. Note the two subtractive pairs: CM (900) and XC (90) and IX (9). Before the subtractive convention, this would be written MDCCCCLXXXXVIIII in purely additive form — the modern version is much more compact.

Parsing: canonical vs non-canonical

The parser is lenient: it accepts IIII as 4 as well as the canonical IV. Scan left to right; at each position, if the current symbol is smaller than the next, subtract; otherwise add. The tool reports when the parsed input isn’t in canonical form so you know the canonical representation.

Example: subtractive vs additive

  • 4: canonical IV, non-canonical IIII
  • 9: canonical IX, non-canonical VIIII
  • 49: canonical XLIX, non-canonical XXXXVIIII (pure additive) or IL (not valid — subtraction only works between adjacent powers of 10)

The rule: you can subtract only I from V or X, only X from L or C, and only C from D or M. So 99 is XCIX, not IC. 49 is XLIX, not IL. The tool outputs only canonical subtractive forms.

Why Roman numerals persist

Even though Arabic (decimal) numerals have been standard for centuries, Roman numerals still appear in specific contexts:

  • Clock faces — traditional design, often with IIII instead of IV
  • Monarch names — Elizabeth II, Henry VIII, Louis XIV
  • Book chapters and movie sequels — Volume III, Chapter XII, Rocky IV
  • Years on buildings, films, TV credits — Copyright MCMLXXXVIII
  • Legal documents — Article IV, Section VII

For any of these, bouncing between forms (and verifying you got the canonical one) is what this tool is for.

What this tool does not do

It doesn’t handle numbers above 3999. That’s the classical limit of standard Roman numerals without extensions.

It doesn’t handle zero or negative numbers. Romans had no zero symbol (the concept of zero as a number came from India, via Arabic mathematicians), and there’s no standard negative representation.

It doesn’t support Unicode Roman numeral characters (Ⅰ Ⅱ Ⅲ …). Those are single code points that render as Roman numerals but the tool expects ASCII letters I, V, X, L, C, D, M.

It doesn’t produce the overlined vinculum form for larger numbers (V̄ for 5000, for example). These extensions exist in some sources but aren’t consistently standardised, so the tool stops at the classical range.

It doesn’t explain the derivation. For “MCMXCIX breaks down as M + CM + XC + IX” as a visual walkthrough, you’d need a dedicated educational tool. This one just does the conversion.

Frequently asked questions

Why is the range limited to 1 – 3999?

Because Roman numerals traditionally stop there. The classical system has no single-character symbol for 5000 or anything larger, so to represent 4000 you'd have to write MMMM — which is non-standard (canonical form uses at most three consecutive Ms). Extensions like the vinculum (an overbar meaning 'multiply by 1000') exist for larger numbers but were never standardised across sources. Most reference dictionaries and converters stop at 3999 = MMMCMXCIX for this reason.

What is subtractive notation?

The rule that a smaller-value symbol placed before a larger one subtracts instead of adding. IV is 5 − 1 = 4, IX is 10 − 1 = 9, XL is 50 − 10 = 40, XC is 90, CD is 400, CM is 900. This is the modern canonical form. Classical Latin also used additive-only notation in some contexts (IIII for 4, instead of IV), and you'll still see IIII on clock faces for tradition's sake. The tool produces canonical subtractive forms when going arabic → Roman, but accepts both forms when parsing Roman → arabic.

Does the converter accept lowercase?

Yes. The parser normalises to uppercase before analysing, so 'ix', 'IX', and 'iX' all return 9. The output always uses uppercase, which is conventional for Roman numerals in English text. If you're typing into a field and using lowercase out of habit, it'll still work.

Why does MMMM give an error?

Because 4000 is outside the valid Roman numeral range as traditionally defined. Canonical Roman numerals allow at most three consecutive M characters (representing 3000), and the next thousand would need a dedicated symbol the classical system doesn't have. The tool enforces the 3999 cap. If you need to represent larger values, you're outside the range of standard Roman numerals and need a different system.

What happens if I type a non-canonical form like IIII?

The parser still accepts it and returns 4. The tool doesn't strictly enforce canonical-only input because non-canonical forms occasionally appear (most famously IIII on traditional clock faces). If your input is non-canonical, the tool notes what the canonical form is ('Non-canonical — canonical is IV'), and the arabic result updates to show the parsed value. The arabic-to-Roman direction always produces canonical form.