Roman Numeral Converter
Type a number from 1 to 3999 to get its Roman numeral, or type a Roman numeral to get the number. The converter rejects malformed numerals such as IIII or VX.
How to use it
Use the top box for numbers and the bottom box for Roman numerals. Typing in one box clears the other. Letters can be lower or upper case.
How it is calculated
Conversion to Roman uses a greedy table: 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. The largest value that fits is subtracted repeatedly.
For the reverse direction each symbol is added, except when a smaller symbol comes before a larger one, in which case it is subtracted. The result is converted back to Roman and compared with the input, which rejects forms like IIII or IC.
Examples
1994 = 1000 + 900 + 90 + 4 = M + CM + XC + IV = MCMXCIV.
XLII: XL is 40 and II is 2, so the value is 42.
Good to know
Roman numerals still appear on clocks, book chapters, movie sequels, building cornerstones, outlines and event names. Their rules are simple: symbols are written from largest to smallest, a symbol is repeated at most three times in a row, and only I, X and C can be placed before a larger symbol to subtract.
FAQ
Why does the converter stop at 3999?
Standard Roman numerals have no symbol above M, and MMM is the largest repetition allowed, so 3999 (MMMCMXCIX) is the top.
Is IIII a valid Roman numeral?
Not in the standard form, which writes 4 as IV, although IIII appears on some clock faces.
How do I write zero?
Roman numerals have no zero symbol.
Can I enter lowercase letters?
Yes. Input is converted to uppercase automatically.