Decimal ↔ Roman Numeral Converter

Convert between decimal numbers and Roman numerals instantly

Enter any number between 1 and 3999
Enter Roman numerals (I, V, X, L, C, D, M)
24
Conversion Result
2024 = MMXXIV
Two thousand twenty-four
I
1
V
5
X
10
L
50
C
100
D
500
M
1000

📚 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:

function toRoman(num) {
  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

  1. Add values from left to right: VI = 5 + 1 = 6
  2. Smaller before larger means subtract: IV = 5 - 1 = 4
  3. Larger before smaller means add: XI = 10 + 1 = 11
  4. Never repeat a symbol more than 3 times: Use 4 = IV, not IIII
  5. Symbols are written from largest to smallest: 1492 = MCDXCII
// Example: Convert 2024 to Roman
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

Q: What is the largest number that can be represented in Roman numerals?

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.

Q: Why is 4 written as IV instead of IIII?

A: The subtractive principle (IV) is the standard Roman notation. IIII is sometimes seen on clock faces for aesthetic balance.

Q: How is zero represented in Roman numerals?

A: There is no representation for zero in Roman numerals. The concept of zero didn't exist in ancient Roman mathematics.

Q: Can this converter handle both directions?

A: Yes! This is a bidirectional converter. Type a decimal number to get Roman numerals, or type Roman numerals to get the decimal equivalent.