Decimal ↔ Roman Numeral Converter
Convert between decimal numbers and Roman numerals instantly
📚 Decimal to Roman Numeral Conversion
Basic Roman Numerals
- I = 1
- V = 5
- X = 10
- L = 50
- C = 100
- D = 500
- M = 1000
Subtractive Notation
Romans used subtractive notation for numbers like 4 and 9:
- IV = 4 (5 - 1)
- IX = 9 (10 - 1)
- XL = 40 (50 - 10)
- XC = 90 (100 - 10)
How Conversion Works
The algorithm processes the number from largest to smallest:
const values = [1000,900,500,400,100,90,50,40,10,9,5,4,1];
const symbols = ['M','CM','D','CD','C','XC','L','XL','X','IX','V','IV','I'];
let result = '';
for(let i=0; i<values.length; i++) {
while(num >= values[i]) {
result += symbols[i];
num -= values[i];
}
}
return result;
}
Limitations
- No zero in Roman numerals
- No negative numbers
- Traditional system goes up to 3999
- No place value system
📊 Common Roman Numerals Reference
| Decimal | Roman | Decimal | Roman | Decimal | Roman |
|---|---|---|---|---|---|
| 1 | I | 10 | X | 100 | C |
| 2 | II | 20 | XX | 200 | CC |
| 3 | III | 30 | XXX | 300 | CCC |
| 4 | IV | 40 | XL | 400 | CD |
| 5 | V | 50 | L | 500 | D |
| 6 | VI | 60 | LX | 600 | DC |
| 7 | VII | 70 | LXX | 700 | DCC |
| 8 | VIII | 80 | LXXX | 800 | DCCC |
| 9 | IX | 90 | XC | 900 | CM |
| 10 | X | 100 | C | 1000 | M |
🔢 How to Read Roman Numerals
- Add values from left to right: VI = 5 + 1 = 6
- Smaller before larger means subtract: IV = 5 - 1 = 4
- Larger before smaller means add: XI = 10 + 1 = 11
- Never repeat a symbol more than 3 times: Use 4 = IV, not IIII
- Symbols are written from largest to smallest: 1492 = MCDXCII
2024 = 2000 + 20 + 4
2000 = MM
20 = XX
4 = IV
Result: MMXXIV
// Example: Convert MCMXCIV to decimal
M = 1000
CM = 900 (1000 - 100)
XC = 90 (100 - 10)
IV = 4 (5 - 1)
Total: 1000 + 900 + 90 + 4 = 1994
🎯 Modern Uses of Roman Numerals
Clocks and Watches
Traditional clock faces often use Roman numerals for hour markers.
Movie Production
Used in copyright dates (MCMLXXXIV = 1984).
Monarch Names
King Henry VIII, Pope John Paul II, etc.
Book Chapters
Often used for prefaces, introductions, and volume numbers.
❓ Frequently Asked Questions
A: In the traditional system, the largest number is 3,999 (MMMCMXCIX). For larger numbers, a line above the numeral multiplies it by 1,000.
A: The subtractive principle (IV) is the standard Roman notation. IIII is sometimes seen on clock faces for aesthetic balance.
A: There is no representation for zero in Roman numerals. The concept of zero didn't exist in ancient Roman mathematics.
A: Yes! This is a bidirectional converter. Type a decimal number to get Roman numerals, or type Roman numerals to get the decimal equivalent.