CompoundPage

Roman Numeral Converter

The Roman numeral converter turns numbers into Roman numerals and back, with the work shown and malformed numerals like IIII or IM flagged.

1 to 3999.

Roman numeralMCMXCIV

How it breaks down
M = 1000 + CM = 900 + XC = 90 + IV = 4
Characters
7
Subtractive pairs used
CM, XC, IV
Back to a number
1994
The symbols and the allowed subtractive pairs
SymbolValueSymbolValue
I1IV4
V5IX9
X10XL40
L50XC90
C100CD400
D500CM900
M1,000

How the Roman Numeral Converter works

Roman numerals are an additive system with a subtractive shortcut. Seven symbols carry fixed values (I is 1, V is 5, X is 10, L is 50, C is 100, D is 500, M is 1,000), and a number is written by stacking them from largest to smallest and adding them up. MMXXVI is 1000 + 1000 + 10 + 10 + 5 + 1 = 2026.

The subtractive part is what makes reading them non-trivial. Rather than writing IIII for 4, the convention puts a smaller symbol before a larger one to mean subtraction: IV is 4 and IX is 9. The decoding rule is a single pass left to right: if a symbol is smaller than the one after it, subtract it; otherwise add it. MCMXCIV decodes as M (1000), CM (-100 + 1000 = 900), XC (-10 + 100 = 90), IV (-1 + 5 = 4), so 1994.

Only six subtractive pairs are permitted, and the restriction is strict: a symbol may only precede the next two values up. So IV and IX are legal, XL and XC are legal, CD and CM are legal, and nothing else is. 99 is XCIX (ninety plus nine), not IC, even though IC would decode to 99 under the naive rule. Likewise 1999 is MCMXCIX and not MIM.

Converting the other way is a greedy walk. Take the largest value that fits, write its symbol, subtract it, repeat. Because the six subtractive pairs are included in the list of available values at their proper positions, the greedy algorithm produces the canonical form directly with no special cases.

There is no zero. An additive system has no need of a placeholder (you write what you have and leave out what you do not), so the concept never arose. That is an absence rather than an oversight, and it is one of the reasons positional notation won: you cannot do columnar arithmetic without a zero to hold an empty column.

Malformed numerals such as IIII, VX and IM are common in the wild and worth distinguishing from invalid ones: they parse to a number without being the standard way to write it. The test for whether a numeral is well formed is whether it round-trips: parse it to a number, convert back, and see if you get the same string.

The practical uses that remain are all about convention rather than arithmetic: copyright dates in film credits, the Super Bowl, monarchs and popes, book front matter, clock faces, and outline numbering. Nobody has done arithmetic in them for a very long time, which is reasonable: try multiplying XLVII by XIX.

Roman Numeral Converter FAQ

How do you write 1994 in Roman numerals?

MCMXCIV. M is 1000, CM is 900 (100 before 1000), XC is 90 (10 before 100) and IV is 4 (1 before 5). Reading left to right and subtracting any symbol smaller than the one after it gives 1000 + 900 + 90 + 4.

Why is 4 written IV and not IIII?

The subtractive convention shortens repeated symbols: a smaller symbol before a larger one is subtracted, so IV is 5 minus 1. IIII is still readable and appears on most clock faces that use Roman numerals, usually explained as visual balance against the VIII opposite, but it is not standard notation.

Why is 99 not IC?

Because a symbol may only precede the next two values up. I can precede V and X, X can precede L and C, and C can precede D and M. Nothing else can. So 99 is XCIX, ninety plus nine, and 1999 is MCMXCIX rather than MIM.

What is the largest Roman numeral?

3,999 in standard notation: MMMCMXCIX. M is the largest symbol and MMMM is disallowed, so there is no way further without a vinculum, a bar over a numeral that multiplies it by a thousand. Plain text cannot show it, which is why converters stop there. There is also no zero.

Roman numeral arithmetic and dates

Related calculators

Embed this calculator
<div id="compoundpage-roman-numeral-converter"></div>
<script src="https://compoundpage.com/embed/roman-numeral-converter.js" async></script>

The same calculation as JSON