Roman Numerals

Roman numerals aren’t used much in modern computing, and they’re tricky to understand. Interestingly, they don’t include a zero, or do they?

Roman numerals are represented by seven different symbols: IVXLCD and M.

Symbol       Hindu Equivalent
I             1
V             5
X             10
L             50
C             100
D             500
M             1000

Rules

  • Typically, Roman numerals are written from largest to smallest, left to right.
  • Repeating a numeral up to three times indicates addition, such as III for 3 (1 + 1 + 1).
  • Only IXC, and M can be repeated; VL, and D cannot.
  • Numerals in decreasing order from left to right are additive: LX for 60 (50 + 10), XVI for 16 (10 + 5 + 1).
  • To avoid repeating a numeral four or more times, smaller numerals placed before larger ones indicate subtraction, like IV for 4 (5 - 1) or IX for 9 (10 - 1). Only specific numeral pairs use this rule.

Examples

For instance, 2 is written as II, combining two ones. 12 is XII, and 27 is XXVII.

The numeral for four is not IIII, but IV, indicating subtraction. Similarly, nine is written as IX. Specific subtraction rules are:

  • I before V (5) and X (10) makes 4 and 9.
  • X before L (50) and C (100) makes 40 and 90.
  • C before D (500) and M (1000) makes 400 and 900.

Some more examples:

RomanHindu Equivalent Value
IV4 = 5 - 1
IX9 = 10 - 1
XL40 = 50 - 10
XC90 = 100 - 10
CD400 = 500 - 100
CM900 = 1000 - 100

Full List

Here is the list:

NumberRoman numeral
0not defined
1I
2II
3III
4IV
5V
6VI
7VII
8VIII
9IX
10X
11XI
12XII
13XIII
14XIV
15XV
16XVI
17XVII
18XVIII
19XIX
20XX
30XXX
40XL
50L
60LX
70LXX
80LXXX
90XC
100C
200CC
300CCC
400CD
500D
600DC
700DCC
800DCCC
900CM
1000M
5000V
10000X
50000L
100000C
500000D
1000000M