The rules this converter enforces
Roman numerals use seven symbols: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500 and M = 1000. Values are added left to right, except for six subtractive pairs where a smaller symbol sits before a larger one: IV (4), IX (9), XL (40), XC (90), CD (400) and CM (900). Only I, X and C may be used subtractively, and each only before the next two larger symbols. V, L and D are never subtracted or repeated, and no symbol appears more than three times in a row.
Number to numeral is greedy: starting from the largest value, the converter keeps taking M, CM, D, CD, C and so on until nothing remains. Numeral to number reads the letters left to right, subtracting any letter that sits before a larger one, then converts that value back and compares it with your text. Anything that does not match is rejected, which is how non-standard spellings are caught, and the converted-back form is offered as the suggestion. Lower-case input is accepted.
Worked examples
| Number | Breakdown | Numeral |
|---|---|---|
| 1994 | M + CM + XC + IV | MCMXCIV |
| 2024 | MM + XX + IV | MMXXIV |
| 49 | XL + IX | XLIX |
| 444 | CD + XL + IV | CDXLIV |
| 3999 | MMM + CM + XC + IX | MMMCMXCIX |
| 4500 | I̅V̅ (4 × 1,000) + D | I̅V̅D |
| 3,999,999 | M̅M̅M̅C̅M̅X̅C̅I̅X̅ + CMXCIX | M̅M̅M̅C̅M̅X̅C̅I̅X̅CMXCIX |
How errors are reported
- Every malformed numeral that can be read gets the same "did you mean" hint:
IIIIsuggests IV,VVsuggests X andXIIIIsuggests XIV. IL(intended 49) suggests XLIX andIC(99) suggests XCIX. A pair likeVXis read as 10 − 5, so it suggests V.- A string that reads as more than 3,999,999, such as M̅M̅M̅M̅, gets a message pointing to the new ceiling. Plain MMMM is simply malformed, so it suggests I̅V̅.
- A barred letter that should have been plain is flagged: I̅ means 1,000, so the suggestion is M. Barred letters placed after plain ones, as in D(V), are rejected with an explanation of the order.
- A string with any letter outside M, D, C, L, X, V, I is rejected as invalid letters, and so are unmatched parentheses or a stray overline.
- Numbers must be whole and between 1 and 3,999,999. There is no symbol for zero, so 0, 4,000,000 and 12.5 are all out of range.
Thousands and the vinculum
The plain symbols stop at MMMCMXCIX (3999), because four Ms in a row would break the three-repeats rule. Past that point, this converter uses the vinculum: a bar over a letter multiplies it by 1,000. Below 4000 the output stays classical, so 3000 is MMM and 3999 is MMMCMXCIX. From 4000 up, the thousands part is written with a bar over every letter and the remainder follows in plain letters. 4000 is I̅V̅, 5000 is V̅, 1,000,000 is M̅ and the ceiling is 3,999,999.
Typing the bar is awkward on most keyboards, so the numeral-to-number box accepts two spellings: the combining overline (Unicode U+0305) after each letter, or parentheses around the thousands, as in (IV)D for 4,500. Output always uses the overline, and it can be copied straight from the result. Medieval and later writers also used other forms, such as a double bar for millions or boxes around a numeral. Those are not supported, which is why the range ends at 3,999,999.
Real-world quirks
Clocks often show IIII for 4, and Roman usage itself was flexible: the strict subtractive form is largely a modern standard. Film copyright dates, chapter numbers, Super Bowl numbering and monarch names still use numerals. Remember that Roman numerals are not positional, so they cannot be handled like digits in other bases; for those, use the number base converter, and for spelled-out numbers see numbers to words.