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

Loading calculator…

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

Why is the upper limit 3999?+
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.
Why is IIII rejected when I see it on some clocks?+
IIII is a clockmaker’s convention, not the classical written form. Watchmakers favoured IIII for visual symmetry against the VIII opposite it on the dial. This converter follows the modern subtractive standard (IV for 4), the one taught in schools and used in citation conventions.
What is the subtractive rule exactly?+
A smaller numeral placed before a larger one is subtracted. Only six pairs are valid: IV (4), IX (9), XL (40), XC (90), CD (400), CM (900). Other subtractive pairs (IL for 49, VL for 45, etc.) are not allowed in standard form.
How many letters in a row are allowed?+
At most three consecutive identical letters for I, X, C, M. The letters V, L, D never repeat. So 3 is III but 4 must be IV; 8 is VIII but 9 must be IX; 80 is LXXX but 90 is XC.
Why is there no Roman zero?+
Roman arithmetic was used for tallying, accounting, and inscriptions — domains where you would not write a numeral for "no items". The concept of zero as a number was developed in Indian mathematics and reached Europe via Arabic mathematicians; only at that point did "0" become a digit in regular use.
What does the calculator do for non-canonical valid inputs?+
Currently the validator is strict — input must match the standard subtractive pattern. Strings like XIIII or XIIIIII are rejected even though a human might guess their intent. Use the standard form (e.g. XIV instead of XIIII).

Related calculators

More tools you might like

Hand-picked tools that pair well with this one — same audience, same intent.