Roman Numerals Converter

Type a number to get its Roman numeral, or type a Roman numeral to get its value. Only canonical Roman numerals are accepted.

—

Enter a value in either field.

What this tool does

Roman numerals are still used for regnal names, film and game sequels, clock faces, chapter numbering and dates on buildings. This converter goes both ways and, importantly, rejects invalid forms rather than silently guessing — so it is safe to use as a checking tool, not just a printer.

Method

Values are built greedily from the canonical pairs 1000 (M), 900 (CM), 500 (D), 400 (CD), 100 (C), 90 (XC), 50 (L), 40 (XL), 10 (X), 9 (IX), 5 (V), 4 (IV) and 1 (I). For parsing, the symbols are consumed in that same order and then the result is written back with the first algorithm; if the round-trip does not reproduce the input, the input was not canonical and is reported as invalid. This catches both illegal characters and forms like IIII or VX.

Example

NumberRomanNote
4IVsubtractive
49XLIXboth subtraction rules
1994MCMXCIV—
2569MMDLXIXthe Thai Buddhist year 2569
3999MMMCMXCIXlargest supported

Why 3999 is the largest

Classical Roman numerals use seven symbols — I, V, X, L, C, D, M — and M is 1,000. The standard form repeats M at most three times, so the largest value expressible without a non-standard notation is 3,999 (MMMCMXCIX). Values of 4,000 and above need a vinculum or an apostrophus: a bar over a symbol multiplies it by 1,000, so V̅ means 5,000. Those forms were used historically but are not part of the modern convention, and they are not universally understood — which is why this tool stops at 3,999 and returns nothing above it rather than inventing a form.

Zero is the other boundary. Roman numerals have no symbol for zero; the concept arrives from Indian mathematics via Arabic numerals. So 0 has no Roman representation, and negative numbers have none either. Both are reported as invalid rather than mapped to something arbitrary.

The subtraction rule, precisely

Roman numerals are mostly additive — VI is 5 + 1 — but a smaller symbol before a larger one subtracts. The rule is narrower than “any smaller before any larger”: only six pairs are canonical.

PairValueCanonical use
IV41 before 5
IX91 before 10
XL4010 before 50
XC9010 before 100
CD400100 before 500
CM900100 before 1,000

Anything else is non-canonical. VL is 45 by arithmetic but is not a valid Roman numeral; IIII is 4 but the standard form is IV; VX is 5 by subtraction but is meaningless. This is why the parser here round-trips: it converts the input to a number, converts that number back, and rejects the input if the result differs. Arithmetic validity and canonical form are different questions, and only the round-trip checks the second one.

Where you still meet Roman numerals

  • Copyright years on films and books, and on older buildings.
  • Regnal numbers — Elizabeth II, Louis XIV — where the ordinal is part of the name.
  • Preliminary pages of books, numbered i, ii, iii while the body uses Arabic digits.
  • Clock faces, though many use IIII rather than IV for visual symmetry with VIII.
  • Super Bowls and other event numbering, which has produced forms like XLIX and LVII.
  • Outlines and lists in legal and academic documents, where I, II, III nests above A, B, C.

The clock face is a good reminder that convention is not the same as arithmetic: IIII is common on clocks and technically non-canonical. A strict parser will reject it, which is the correct behaviour for a converter but can be surprising if you are transcribing an image.

Parsing versus formatting

Formatting is the easy direction: greedily subtract the largest symbol that fits, using the thirteen canonical values (1,000 down through 1). Parsing is the direction that needs care — you must consume symbols left to right and apply subtraction only for the canonical pairs, then verify the result. A parser that simply sums symbols and subtracts whenever a smaller precedes a larger will accept IIII and VL, which are not standard.

The practical consequence for a converter: if the input is rejected, it is usually because it is arithmetically valid but non-canonical, not because the parser is broken. Try the canonical form — IIII → IV — before assuming a bug.

Unicode has its own Roman numeral characters

Beyond ASCII letters, Unicode includes precomposed Roman numeral code points such as U+2160 (Ⅰ), U+2161 (Ⅱ) and U+216F (Ⅿ). They look like the letters but are separate characters, so a string containing them will not match a regex looking for I, V and M. If text pasted from a document is being rejected as invalid, check whether it used the precomposed forms — the code point inspector will show them.

Frequently asked questions

What is the largest number this converter handles?

3,999, written MMMCMXCIX. The classical notation has no symbol beyond M and allows at most three of them in a row; larger values need a bar over a numeral (a vinculum) to multiply it by 1,000, which is not universally understood and is not produced here. The parser reports 4,000 and above as out of range rather than inventing a form.

What is the largest number supported?

3999 (MMMCMXCIX). Standard Roman numerals have no zero and no subtractive notation beyond the rules used here, so 4000 and above are outside the classical system.

Why is 4 written IV and not IIII?

Classical subtractive notation writes 4 as IV, 9 as IX, 40 as XL, 90 as XC, 400 as CD and 900 as CM. This tool accepts only that canonical form, so IIII is reported as invalid.

Is the conversion case-sensitive?

No. mcmlxxxiv and MCMLXXXIV both parse to 1984. The output is always upper case.

Does it handle zero or negative numbers?

No. Roman numerals have no representation for zero or negative values, so those inputs are rejected.

What does “invalid” mean?

The input contains a character outside I, V, X, L, C, D, M, or it is syntactically parseable but not in canonical form — for example IIII or VX.

Sources

  • Standard Roman numeral notation: additive and subtractive rules with the seven symbols I, V, X, L, C, D, M.
  • Unicode Standard, Latin-1 Supplement and Number Forms, for the seven numeral characters.

Everything runs in your browser — nothing you type is uploaded.