MathsNumber Theory

Roman Numeral
converter.

Turn a number into Roman numerals or read a numeral back, with a check that it is standard.

How it's worked out

Roman numerals use seven letters. Each one has a fixed value, and in standard form you write them from the largest to the smallest and add them up.

The seven symbols
SymbolValue
I1
V5
X10
L50
C100
D500
M1,000

Fours and nines use subtraction. A smaller symbol before a larger one is taken away from it. Project Euler's summary of the rules allows only six such pairs: I before V or X, X before L or C, and C before D or M. That gives IV, IX, XL, XC, CD and CM, for 4, 9, 40, 90, 400 and 900.

Write one place at a time. Split the number into thousands, hundreds, tens and ones, and write each part on its own. For 1,999 that is M + CM + XC + IX, which gives MCMXCIX. A place that holds 0 is left out, because there is no Roman zero.

1999\displaystyle 1999=1000+900+90+9\displaystyle {}= 1000 + 900 + 90 + 9

Reading goes the other way. Go left to right. When a symbol is smaller than the one after it, read the pair as one group and subtract. Then add the groups. The steps show each group and end by checking the result in the other direction.

Above 3,999 standard form runs out, since M may repeat only three times and MMMCMXCIX is the largest numeral. A bar over a numeral multiplies it by 1,000, so 12,000 is X̅I̅I̅. Turn on the bar option to use it, up to 3,999,999.

Worked examples

Ana reads the year in a film's credits

The last line of the credits says MCMLXXXIV. Ana splits it into groups: M for 1,000, CM for 900, L for 50, X for 10, X for 10, X for 10, IV for 4. CM and IV are the two subtractive pairs.

Adding the groups gives 1,984. Written place by place, that is M + CM + LXXX + IV, which matches what she read, so the credits use standard form.

Open this example in the tool

Ben numbers section 49 of a report

Ben's outline uses numerals for its sections, and he is tempted to write IL for 49, one less than 50. But I may only come before V or X. Writing each place on its own gives XL for 40 and IX for 9, so 49 is XLIX.

If he types IL, the converter reads it as 49 and flags it: IL is not a standard subtractive pair (only IV, IX, XL, XC, CD and CM are). The standard form is XLIX. In the same way, IC reads as 99 but should be XCIX.

Open this example in the tool

Jo checks the four on a clock face

Jo's kitchen clock shows IIII where she expected IV. The converter reads IIII as 4 and notes: IIII repeats I more than three times in a row. The standard form is IV.

MathWorld notes that clock faces usually show IIII rather than IV, so her clock is following an old custom, not making a mistake. On a document or a heading, IV is the form to use.

Open this example in the tool

Reading your result

Standard or not. Every numeral the converter reads is turned back into standard form and compared with what you typed. If they differ, it names the rule that was broken: a pair that is not one of the six, a value that goes up from left to right, or a symbol repeated too often.

Long numerals need care. The longest year up to 2026 is 1,888, written MDCCCLXXXVIII with 13 letters. One dropped or swapped letter changes the year, so read a long numeral group by group, as the steps do.

Dates. Write each part on its own. July 4, 1776 becomes VII.IV.MDCCLXXVI with dots between the parts. November 10, 2026 is XI.X.MMXXVI. Put the day first if that is the order used where you live.

Common mistakes

  • Subtracting across more than one step. IL for 49, IC for 99 and XM for 990 all break the six-pair rule. Write each place on its own: XLIX, XCIX and CMXC.
  • Subtracting V, L or D. VX for 5 and LC for 50 are never used, since V, L and D are written on their own: V and L.
  • Repeating a symbol four times. XXXX for 40 and CCCC for 400 should be XL and CD. The clock face IIII is the one well known exception.
  • Expecting a zero. There is no Roman numeral for 0, so 2,006 is MMVI with nothing for the empty hundreds and tens.

Questions people ask

It is a long custom among clock makers, and no single reason is agreed. The theories include copying older practice, the visual balance of IIII against VIII on the other side of the dial, and a story about Louis XIV that is likely a legend. Some well known clocks use IV instead.

Sources