The roman numeral converter takes one field and works in both directions at once. Type 1994 and it answers MCMXCIV; type MCMXCIV, lowercase or with spaces between the letters, and it answers 1994. The result card shows the Arabic number and the Roman numeral side by side, each with its own copy button, and a reference table below lists the seven base symbols: I is 1, V is 5, X is 10, L is 50, C is 100, D is 500, M is 1,000.
How a number breaks down
The converter walks a 13-step table from largest to smallest: M (1,000), CM (900), D (500), CD (400), C (100), XC (90), L (50), XL (40), X (10), IX (9), V (5), IV (4), I (1), and appends each symbol as many times as it fits. For 1,994 that is M for 1,000, CM for 900, XC for 90, and IV for 4: MCMXCIV. The year 2,026 becomes MM, then XX, then VI: MMXXVI. The placeholder example 42 lands on XL then II: XLII.
The six subtractive pairs
Only six subtractions are legal: IV (4), IX (9), XL (40), XC (90), CD (400), CM (900). The validator is a strict pattern over the canonical order, so 49 is XLIX, never IL; 99 is XCIX, never IC; and 44 is XLIV, because four X in a row like XXXXII breaks the rule that a symbol may repeat at most three times. VV, IIII, and XM are rejected the same way: the pattern checks that the M block, then the C-or-D block, then the X-or-L block, then the I-or-V block each appear in descending order and nothing else.
The range, and its one loophole
An Arabic number must be a whole integer between 1 and 3,999; 0 and 4,000 both get the range error. 3,999 is the largest canonical Roman numeral, and it writes MMMCMXCIX: three M, then CM, then XC, then IX. The loophole: Roman-numeral input has no upper bound at all. The pattern lets any run of M through, so MMMM parses to four thousand and MMMMM to five thousand, even though no Arabic input could ever produce either string.
What the field accepts
The field first tries to read the text as a whole number, and only if the text equals that number exactly does it convert. A 42 with stray spaces on both sides works because the text is trimmed first, but 42.0 fails: it parses to 42, the two strings differ, so the text is instead treated as a Roman numeral and rejected. 1,994 with its comma behaves the same way. On the Roman side, letter case and inner spaces do not matter: mcmxciv and m c m x c i v both return 1994.
Where the number goes
Roman numerals survive on year plates, chapter markers, and clock faces, so 2,026 becomes MMXXVI on a diploma or a title card. MCMXCIV is seven characters where 1994 is four; the character counter makes that length difference concrete. Reversing the letters with the text reverser gives VICXMCM, which the converter refuses, a quick demo of how strict the order rules are. The number base converter covers the other side of number systems, with 1994 as 11111001010 in binary and 7CA in hexadecimal, and the morse code tool is the closest cousin: another scheme that spells values out of a small fixed alphabet.
Related reading
The caesar rot13 tool is the other classic from the Roman era, shifting each letter by a fixed amount instead of composing a number from symbols. For another ratio-flavored how-to, see how to calculate an aspect ratio, and for the text-side cleanup step, see how to use a string escape tool.