Roman Numeral Converter (1–3999)

Convert between Roman numerals and Arabic integers (1–3999). Strict subtractive-form validation — flags malformed numerals like IIII or VC.

Inputs

Must be a whole number 1–3999. Classical Roman numerals do not include zero or negative values.

Uppercase letters from the set I V X L C D M; subtractive forms IV, IX, XL, XC, CD, CM are required where applicable.

Result

1994 in Roman
MCMXCIV
  • Length7 letters
  • DecompositionM · CM · XC · IV
Note — Classical Roman numerals encode integers 1–3999. Larger numbers used overline-bar (M̄ = 1,000,000) which is not rendered here.

Step-by-step

  1. Greedy from largest to smallest, emitting the subtractive form (CM, CD, XC, XL, IX, IV) whenever it fits.
  2. Result: MCMXCIV = M(1000)CM(900)XC(90)IV(4).

How to use this calculator

  • Pick a direction. The active input box updates accordingly.
  • Arabic → Roman: type any whole number 1–3999.
  • Roman → Arabic: type uppercase letters from I V X L C D M. The validator rejects malformed strings.
  • Read the breakdown row for the digit-by-digit decomposition.

About this calculator

The Roman number system survives today on clock-faces, copyright dates, monarch numbers, and Super Bowl branding. The classical written form uses seven letters (I, V, X, L, C, D, M) and the subtractive-pair shorthand (IV = 4, IX = 9, XL = 40, XC = 90, CD = 400, CM = 900). This converter goes both ways and validates strictly: malformed numerals like IIII, VV, or IL are rejected with a reason. The Arabic side accepts integers 1–3999, the upper bound of classical Roman notation before the overline-bar (M̄ = 1,000,000) takes over.

How it works — the formula

arabic → roman: greedy emit (M=1000, CM=900, D=500, CD=400, C=100, XC=90, L=50, XL=40, X=10, IX=9, V=5, IV=4, I=1) roman → arabic: walk letters; subtract if next > current, else add

The standard subtractive form is regular enough to recognise with a single regex (^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$) and convert via a 13-entry greedy table.

Worked examples

Example 1
Year 1994
Inputs:
arabic = 1994
Output:
MCMXCIV (M + CM + XC + IV)
Example 2
Year 2026
Inputs:
arabic = 2026
Output:
MMXXVI
Example 3
Reverse
Inputs:
roman = MCMLXXVII
Output:
arabic 1977

Limitations

  • Classical range only: 1–3999. No support for the overline-bar form used in early modern manuscripts for 4000+.
  • Strict subtractive validation: archaic forms like IIII, VC, IL are rejected.
  • No support for zero or negative integers.

Conversion is exact and reversible: arabicToRoman(romanToArabic(r)) returns the canonical form of r.

Frequently asked

Classical Roman numerals can express 1 through 3999 using only the letters I, V, X, L, C, D, M. To represent 4000 and above the Romans used a horizontal overline (vinculum) that multiplied a numeral by 1,000 — so M̄ = 1,000,000. That convention is unicode-awkward to render reliably, so the tool stops at 3999.

Related calculators

More tools you might like