Type a number to get its Roman numeral, or type a Roman numeral to read its value: the other field updates as you type. The converter shows how the result is built, symbol by symbol, and when a numeral isn't valid (IIII, VX, IC) it tells you which rule it breaks and what the standard form is. It covers 1 to 3999, accepts lower case, and runs entirely in your browser.
How it works
Roman numerals use seven symbols: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500 and M = 1000. A number is written from the largest value to the smallest and the values are added up: XVI is 10 + 5 + 1 = 16, and MDCLXVI uses each symbol once to make 1666. To avoid four identical symbols in a row, six combinations use subtraction: a smaller symbol placed before a larger one is taken away from it. IV = 4, IX = 9, XL = 40, XC = 90, CD = 400 and CM = 900. Only I, X and C are ever subtracted, each only from the next two symbols up (I from V and X, X from L and C, C from D and M), and only one at a time. V, L and D are never repeated and never subtracted. To convert a number, the tool takes the largest value from the list M, CM, D, CD, C, XC, L, XL, X, IX, V, IV, I that still fits, writes it down, subtracts it and repeats until nothing is left. Converting back, it reads the numeral from left to right, subtracting a symbol when the next one is larger and adding it otherwise, then checks that writing the result out again gives exactly what you typed. That check is what catches numerals that add up to something but aren't written the standard way, such as IIX or VV. The largest number in standard notation is 3999, MMMCMXCIX, since M can only be repeated three times. There is no zero, and there are no negative numbers or fractions.
Worked example
The year 1994 splits into thousands, hundreds, tens and units: 1000 + 900 + 90 + 4. Each part has its own symbol: 1000 = M, 900 = CM (100 before 1000), 90 = XC (10 before 100) and 4 = IV (1 before 5). Put together: 1994 = M + CM + XC + IV = MCMXCIV. The other way round, MMXXVI reads as M + M + X + X + V + I = 1000 + 1000 + 10 + 10 + 5 + 1 = 2026. A common mistake is writing 99 as IC. I may only be subtracted from V and X, so 99 has to be built from 90 + 9: XC + IX = XCIX. In the same way 49 is XLIX, not IL, and 1999 is MCMXCIX, not MIM.