How Roman numerals are read
Seven letters carry all the values: I is 1, V is 5, X is 10, L is 50, C is 100, D is 500, and M is 1000. Reading a numeral means walking through it and adding those values, with one twist. When a smaller value sits directly before a larger one, it is subtracted instead of added. IV is 4 because the I is taken away from the V, and IX is 9 for the same reason.
Only six subtractive pairs are valid in the standard system: CM for 900, CD for 400, XC for 90, XL for 40, IX for 9, and IV for 4. Everything else is written additively. That restriction is what makes MCMXCIV read as 1000 plus 900 plus 90 plus 4, which is 1994, rather than as some other arrangement of the same letters.
The converter walks the numeral exactly that way, comparing each letter with the one after it and either adding or subtracting. The result appears as you type, so a numeral pasted from a film credit or a building cornerstone resolves immediately.
- I 1, V 5, X 10, L 50, C 100, D 500, M 1000
- A smaller value before a larger one is subtracted
- The six valid subtractive pairs are CM, CD, XC, XL, IX, and IV
Why it rejects some numerals
Plenty of converters will happily add up any pile of Roman letters you give them. IIII would come back as 4, VX as 5, and IC as 99, none of which are valid Roman numerals in the standard system. That leniency feels helpful until it hides a typo in something you were trying to read correctly.
This converter validates instead. After decoding a numeral to a number, it re-encodes that number back into Roman form and checks the two strings match. If they do not, the input was not a well-formed numeral and it says so. IIII fails because 4 is written IV. VX fails because 5 is written V. The check is simple and it catches everything the standard rules disallow.
One historical caveat is worth knowing. Clock faces very often use IIII rather than IV for four, a convention that goes back centuries and has several competing explanations. That is a real and traditional usage, but it is not the standard form, so this converter will reject it. If you are reading a clock, the answer is 4.
The range, and what falls outside it
The upper bound is 3999, written MMMCMXCIX. That is not an arbitrary cutoff: with only seven letters and no more than three M in a row, 3999 is the largest value the standard system expresses. Anything higher needs the vinculum, an overbar that multiplies a letter by a thousand, which has no single agreed plain-text representation and is not supported here.
The lower bound is 1. Roman numerals have no zero and no way to write a negative number, which is a genuine feature of the system rather than an omission by this tool. That absence is one of the reasons positional Arabic numerals eventually replaced them for arithmetic.
Input is uppercased before anything else, so typing mcmxciv works exactly like MCMXCIV. Only the seven Roman letters are accepted; anything else produces a message naming the letters that are allowed. Leading and trailing spaces are trimmed, but spaces inside the numeral are not, so paste the numeral on its own.
- Valid range is 1 to 3999, with MMMCMXCIX at the top
- There is no zero and no negative number in the system
- Lower case is accepted; other characters are rejected with a clear message