What is a Roman numeral converter?
Roman numerals write numbers with seven letters: I (1), V (5), X (10), L (50), C (100), D (500) and M (1000). Letters are added from the largest to the smallest (XVI is 16), and a smaller letter placed before a larger one is subtracted (IV is 4, IX is 9, XC is 90, CM is 900). Only six such pairs exist, and a letter is never repeated more than three times in a row.
People still use them for the names of kings and popes (Elizabeth II, Pius XII), book chapters, clock faces, outline levels, sporting events such as the Super Bowl and the copyright year in the credits of old films. Converting the other way, reading MCMXCIV on a monument, is the part most people need help with.
This tool converts in both directions with two cards: Arabic (the digits we use every day) to Roman, and Roman to Arabic. It works on whole numbers from 1 to 3999, the range the standard notation can write with these seven letters, because there is no letter above M. Everything runs in your browser and nothing is uploaded.
How to convert Roman numerals
- To get a Roman numeral, use the Arabic to Roman card. The field opens with
42, soXLIIis already shown. - Type a whole number from 1 to 3999. The Roman numeral updates as you type, in a larger font, and a message appears if the number is outside the range.
- Press Copy to copy the numeral. It is only enabled when there is a result to copy.
- To read a Roman numeral, use the Roman to Arabic card and type it. Upper or lower case and spaces around it do not matter:
xliiis read asXLII. - The number appears next to the field, with its own Copy button.
- If the numeral is not written the standard way, the field shows the correction. Typing
IIIIsuggestsIV, andVIIIIsuggestsIX.
There are no options: the two cards are independent and can be used one after the other.
Examples of Roman numeral conversion
The year 1994 and the current year
Arabic 1994 becomes MCMXCIV: M (1000), CM (900), XC (90) and IV (4). In the other direction MMXXVI is 2026.
The subtractive pairs
| Number | Roman | How it is built |
|---|---|---|
| 4 | IV | 5 - 1 |
| 9 | IX | 10 - 1 |
| 40 | XL | 50 - 10 |
| 90 | XC | 100 - 10 |
| 400 | CD | 500 - 100 |
| 900 | CM | 1000 - 100 |
The longest numeral
3888 is written MMMDCCCLXXXVIII, the longest numeral under 4000, with 15 letters. The largest accepted value, 3999, is MMMCMXCIX.
A year in a book: 1666
1666 gives MDCLXVI, which is curious because it uses every letter from M down to I once, in descending order.
A numeral that is not standard
IC could look like 99 (100 minus 1), but the standard form is XCIX, and the tool shows that suggestion instead of a value. Likewise IL for 49 is not accepted; the standard form is XLIX.
Common errors and how to fix them
- We can only convert numbers between 1 and 3,999. The Arabic field accepts nothing below 1 (there is no zero in Roman numerals) or above 3999. For larger numbers the Romans put a bar over the letters, which this tool does not write.
- The input you entered is not a valid roman number. The text has a letter outside
IVXLCDM, or a sequence that does not exist, such asMMMMorABC. Check for a typo such as a zero typed instead of the letterO. - "IIII" is not written the standard way. Did you mean IV? Four equal letters in a row are not accepted by this tool. Clock faces often use
IIIIfor 4 on purpose, but the usual rule isIV. - Two numerals in one field, such as
XII XIII, are not valid. The tool reads one numeral at a time, so convert each part separately.
Frequently asked questions
How do you write 2026 in Roman numerals?
MMXXVI: two thousands (MM), two tens (XX) and a six (VI). Type 2026 in the first card and press Copy.
What is the largest Roman numeral?
In the standard notation MMMCMXCIX, which is 3999. Older and medieval texts sometimes wrote larger values with a bar over the letters, meaning times a thousand, but that is not part of the usual rule.
Is there a zero in Roman numerals?
No. The Roman system has no symbol for zero, which is why this converter starts at 1. For numbers in other systems, such as binary, use the base converter.
Why is 4 written IV and sometimes IIII?
The subtractive form IV is the standard. IIII appears on many clocks and in older inscriptions, but it is considered non-standard, and the tool will suggest IV.
Can I use lowercase letters?
Yes. Lowercase and uppercase are read the same way, and the output is always in capitals. If you need to change the case of other text, there is the case converter.
Does Unicode have Roman numeral characters?
Yes, there is a block with single characters such as Ⅻ (U+216B). Normal letters are safer in text; to see the code of any character, use text to Unicode.
How to convert Roman numerals in code
JavaScript
function toRoman(n) {
const table = [[1000, 'M'], [900, 'CM'], [500, 'D'], [400, 'CD'], [100, 'C'], [90, 'XC'],
[50, 'L'], [40, 'XL'], [10, 'X'], [9, 'IX'], [5, 'V'], [4, 'IV'], [1, 'I']];
let out = '';
for (const [value, letters] of table) {
while (n >= value) { out += letters; n -= value; }
}
return out;
}
toRoman(1994); // 'MCMXCIV'
const map = { I: 1, V: 5, X: 10, L: 50, C: 100, D: 500, M: 1000 };
const fromRoman = s => [...s].reduce((sum, c, i) => (map[s[i + 1]] > map[c] ? sum - map[c] : sum + map[c]), 0);
fromRoman('MCMXCIV'); // 1994Python
TABLE = [(1000, 'M'), (900, 'CM'), (500, 'D'), (400, 'CD'), (100, 'C'), (90, 'XC'),
(50, 'L'), (40, 'XL'), (10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), (1, 'I')]
def to_roman(n):
out = ''
for value, letters in TABLE:
while n >= value:
out += letters
n -= value
return out
print(to_roman(2026)) # MMXXVI