HandyBench

Roman Numeral Converter

Convert numbers to Roman numerals and back.

Number to Roman numeral

MCMXCIV

Roman numeral to number

For 4,000 and up, mark thousands with an overline after each letter or with parentheses: (IV)D = 4,500.

1994

How to use the Roman Numeral Converter

  1. 1 Type a number from 1 to 3,999,999 to see it as a Roman numeral.
  2. 2 Or type a Roman numeral (like MCMXCIV) to see it converted back to a number. For 4,000 and up, put an overline after each thousands letter, or wrap the thousands in parentheses, as in (IV)D.
  3. 3 Both directions update instantly and flag anything invalid.

The rules this converter enforces

Roman numerals use seven symbols: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500 and M = 1000. Values are added left to right, except for six subtractive pairs where a smaller symbol sits before a larger one: IV (4), IX (9), XL (40), XC (90), CD (400) and CM (900). Only I, X and C may be used subtractively, and each only before the next two larger symbols. V, L and D are never subtracted or repeated, and no symbol appears more than three times in a row.

Number to numeral is greedy: starting from the largest value, the converter keeps taking M, CM, D, CD, C and so on until nothing remains. Numeral to number reads the letters left to right, subtracting any letter that sits before a larger one, then converts that value back and compares it with your text. Anything that does not match is rejected, which is how non-standard spellings are caught, and the converted-back form is offered as the suggestion. Lower-case input is accepted.

Worked examples

NumberBreakdownNumeral
1994M + CM + XC + IVMCMXCIV
2024MM + XX + IVMMXXIV
49XL + IXXLIX
444CD + XL + IVCDXLIV
3999MMM + CM + XC + IXMMMCMXCIX
4500I̅V̅ (4 × 1,000) + DI̅V̅D
3,999,999M̅M̅M̅C̅M̅X̅C̅I̅X̅ + CMXCIXM̅M̅M̅C̅M̅X̅C̅I̅X̅CMXCIX

How errors are reported

  • Every malformed numeral that can be read gets the same "did you mean" hint: IIII suggests IV, VV suggests X and XIIII suggests XIV.
  • IL (intended 49) suggests XLIX and IC (99) suggests XCIX. A pair like VX is read as 10 − 5, so it suggests V.
  • A string that reads as more than 3,999,999, such as M̅M̅M̅M̅, gets a message pointing to the new ceiling. Plain MMMM is simply malformed, so it suggests I̅V̅.
  • A barred letter that should have been plain is flagged: I̅ means 1,000, so the suggestion is M. Barred letters placed after plain ones, as in D(V), are rejected with an explanation of the order.
  • A string with any letter outside M, D, C, L, X, V, I is rejected as invalid letters, and so are unmatched parentheses or a stray overline.
  • Numbers must be whole and between 1 and 3,999,999. There is no symbol for zero, so 0, 4,000,000 and 12.5 are all out of range.

Thousands and the vinculum

The plain symbols stop at MMMCMXCIX (3999), because four Ms in a row would break the three-repeats rule. Past that point, this converter uses the vinculum: a bar over a letter multiplies it by 1,000. Below 4000 the output stays classical, so 3000 is MMM and 3999 is MMMCMXCIX. From 4000 up, the thousands part is written with a bar over every letter and the remainder follows in plain letters. 4000 is I̅V̅, 5000 is V̅, 1,000,000 is M̅ and the ceiling is 3,999,999.

Typing the bar is awkward on most keyboards, so the numeral-to-number box accepts two spellings: the combining overline (Unicode U+0305) after each letter, or parentheses around the thousands, as in (IV)D for 4,500. Output always uses the overline, and it can be copied straight from the result. Medieval and later writers also used other forms, such as a double bar for millions or boxes around a numeral. Those are not supported, which is why the range ends at 3,999,999.

Real-world quirks

Clocks often show IIII for 4, and Roman usage itself was flexible: the strict subtractive form is largely a modern standard. Film copyright dates, chapter numbers, Super Bowl numbering and monarch names still use numerals. Remember that Roman numerals are not positional, so they cannot be handled like digits in other bases; for those, use the number base converter, and for spelled-out numbers see numbers to words.

Examples

  • ▸ 1994 → MCMXCIV.
  • ▸ MMXXIV → 2024.
  • ▸ 4500 → I̅V̅D, and (IV)D → 4500.

Frequently asked questions

What is the highest number Roman numerals can represent?

Classical numerals with no bars stop at 3999 (MMMCMXCIX). This converter goes up to 3,999,999 using the vinculum: a bar over a letter multiplies it by 1000, so 4000 is I̅V̅ and 1,000,000 is M̅. Values below 4000 stay in classical form. A double bar for numbers past 3,999,999 is not supported.

How do I type a Roman numeral with a bar over it?

Type the letter and follow it with the combining overline character (U+0305), or skip that and put the thousands part in parentheses: (IV)D is read as 4,500. Barred letters must come before plain ones. The result for 4000 and up always uses the overline form, which you can copy with the copy button.

Why does my Roman numeral show an error?

Roman numerals follow strict formation rules — for example, a symbol can’t repeat more than three times in a row (IIII is invalid; it should be IV), and only certain subtractive pairs like IV, IX, XL, XC, CD and CM are allowed. This tool validates against those rules and, for any malformed numeral it can read, suggests the correct form (IIII gives IV, IC gives XCIX).

How do Roman numerals work?

Symbols are added left to right (VI = 5 + 1 = 6), except when a smaller symbol precedes a larger one, which means subtract it (IV = 5 − 1 = 4). The seven base symbols are I=1, V=5, X=10, L=50, C=100, D=500, M=1000.

Is 49 written XLIX or IL?

XLIX (XL = 40, IX = 9). I may only be placed before V or X, so IL and IC are invalid. This converter rejects them and suggests the correct form: IL gives XLIX and IC gives XCIX.

Why do some clocks show IIII instead of IV?

Clock faces traditionally use IIII, and Roman writers themselves were inconsistent about subtractive forms. The standard modern form is IV, and this converter treats IIII as non-canonical and suggests IV.