Roman Numeral Converter
Free Roman numeral converter. Convert numbers to Roman numerals and back (1999 → MCMXCIX). Validates subtractive notation. No signup.
Number to Roman numeral and back
A Roman numeral converter translates between ordinary integers and Roman numerals in either direction: 1999 becomes MCMXCIX, and MCMXCIX becomes 1999. It applies the subtractive notation rules automatically and rejects strings that are not valid numerals, so IIII is refused even though it adds up to four.
How the conversion works
Converting a number to numerals is greedy. Starting from the largest token and working down, the converter subtracts each value that still fits and appends its symbol. The token list is 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, and 1. Including the subtractive tokens — CM, CD, XC, XL, IX, and IV — is what produces standard notation rather than long strings of repeated symbols.
Converting back reads left to right: if a symbol is smaller than the one after it, subtract it; otherwise add it. The converter then validates the answer by converting the result back to numerals and checking that it matches the input, which is why malformed strings are rejected. Auto mode looks at the text and chooses a direction; valid numerals cover positive whole numbers up to roughly four million.
Worked example with the default value
The input starts at 1999. The greedy pass runs like this:
| Remaining value | Largest token that fits | Append |
|---|---|---|
| 1999 | 1000 | M |
| 999 | 900 | CM |
| 99 | 90 | XC |
| 9 | 9 | IX |
| 0 | — | done |
The result is MCMXCIX. Read it back subtractively: 1000 + (1000 − 100) + (100 − 10) + (10 − 1) = 1000 + 900 + 90 + 9 = 1999, which round-trips correctly.
Reference: symbols and subtractive pairs
| Symbol | Value | Subtractive pair | Value |
|---|---|---|---|
| I | 1 | IV | 4 |
| V | 5 | IX | 9 |
| X | 10 | XL | 40 |
| L | 50 | XC | 90 |
| C | 100 | CD | 400 |
| D | 500 | CM | 900 |
| M | 1000 | — | — |
Common years: 1776 is MDCCLXXVI, 1969 is MCMLXIX, 1984 is MCMLXXXIV, 2024 is MMXXIV, and 3999 is MMMCMXCIX. Above 3999 the converter simply appends more thousands symbols, so 4000 becomes MMMM.
Common mistakes
- Writing 4 as IIII. Some clock faces use it for visual balance, but standard notation is IV.
- Repeating a symbol more than three times. XXXX is invalid; 40 is XL. The same applies to L, D, and V, which never repeat at all.
- Subtracting the wrong symbols. Only I may precede V or X, only X may precede L or C, and only C may precede D or M.
- Assuming lower case fails. Input is converted to upper case first, so mcmxcix is accepted as MCMXCIX.
- Expecting support beyond four million. Numerals used here cannot express larger values, so the converter declines them.
How do I write a year in Roman numerals?
Split the year into thousands, hundreds, tens, and units, then convert each piece. For 1984: 1000 is M, 900 is CM, 80 is LXXX, and 4 is IV, giving MCMLXXXIV. Handle 4, 9, 40, 90, 400, and 900 through their subtractive pairs rather than repeating symbols.
Why is there a maximum value?
The seven basic symbols top out at a few thousand. Because the converter only uses those symbols without overlines, a value such as 4000 is written MMMM and values in the millions would need impractically long strings, so it stops at 3,999,999 and reports anything larger as out of range.
What is the largest standard numeral below 4000?
MMMCMXCIX, which is 3999. It uses three Ms, then CM for 900, XC for 90, and IX for 9. It is the last value before a fourth M would be required.
How do I read a numeral like XLIX?
Scan left to right. X is smaller than L, so you subtract to get 40; I is smaller than X, so you subtract again to get 9. The total is 49. Whenever a smaller symbol sits before a larger one, it is a subtraction.
The number base converter covers the same idea of representing the same value in a different notation, and the scientific notation converter handles the very large numbers Roman numerals cannot reach.