Skip to main content

Roman Numeral Converter

Convert numbers to Roman numerals and Roman numerals to numbers.

Reviewed by · Last reviewed

Roman Numeral

Using the Roman Numeral Converter

  1. Select direction with the tabs: Number → Roman converts an integer to its Roman form; Roman → Number does the reverse.
  2. Type the value. Numbers must be integers in 1-3999; Roman numerals must use only I, V, X, L, C, D, and M (or their lowercase equivalents).
  3. Read the result instantly; the conversion runs on every keystroke so there is no button to press. Invalid input surfaces a short message rather than silently doing nothing.
  4. Copy the output with the Copy button, or highlight and Ctrl+C. The value is plain text suitable for pasting into a document, a wiki, or a chat message.
  5. Toggle direction to verify; round-tripping a numeral through both directions should return the same canonical form (lowercase input is normalised to uppercase).

How the Parser and Emitter Work

Emitting a numeral from a number uses a greedy symbol table that pairs values with their glyphs in descending order: 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. The algorithm repeatedly subtracts the largest value that fits and appends its glyph, which always produces the standard subtractive form (no IIII for 4, no VIIII for 9). This is the same table used by every standard library implementation of the conversion.

Parsing a numeral is a left-to-right scan: if the current symbol is worth less than the next one, subtract; otherwise add. After the scan completes, the parser runs a validation pass that checks subtractive pairs are from the allowed set (IV, IX, XL, XC, CD, CM), that I/X/C appear at most three times in a row, and that V/L/D appear at most once. An input like IIII or VV is rejected even though a naïve left-to-right sum would still return the right number. All of this runs in the browser via a small TypeScript function; there is no network round-trip, and the state lives only in the component.

Where Roman Numerals Still Turn Up

  • Formatting chapter numbers in a book, ordinals for monarchs (Elizabeth II), or outline headings in a legal document.
  • Reading copyright dates on films and TV credits (MCMXCIX for 1999).
  • Numbering Super Bowls, Olympic games, and papal names.
  • Decoding inscriptions on old buildings, clocks, and gravestones.
  • Cataloguing items in classical music scores (symphony numbers, opus numbers).
  • Adding a vintage flourish to a typography mockup or wedding invitation.

Common Confusions

  • IIII vs. IV on clock faces. Many analog clocks display 4 as IIII for aesthetic balance with VIII across the dial. This is non-standard by the usual subtractive rule; the tool emits IV.
  • No zero. The Romans had no numeral for zero. The tool rejects 0 as an input to the integer field because there is no output to give.
  • Subtractive pairs are limited. Only IV, IX, XL, XC, CD, CM are allowed. IL for 49 looks clever but is invalid; the correct form is XLIX.
  • Repetition cap. A single glyph can repeat at most three times (III is 3, MMM is 3000). Four in a row is a parsing error.
  • Case-insensitive input. Lowercase xiv is normalised to XIV internally but displayed in canonical uppercase on output.
  • Whitespace and punctuation inside a numeral is rejected; the parser demands a clean uninterrupted run of valid glyphs.

A Brief History of the Symbols

Roman numerals evolved from Etruscan tally marks and were standardised during the Roman Republic. The forms used today - I, V, X, L, C, D, M - became canonical by late antiquity and survived in European bookkeeping into the Renaissance. Fibonacci's Liber Abaci (1202) advocated for the Hindu-Arabic decimal system, which eventually replaced Roman numerals for arithmetic because place-value notation makes long-form calculation feasible. The upper bound of 3999 comes from the fact that four M's (MMMM) violate the repetition rule and classical Roman texts used overline notation (a vinculum) to multiply a numeral by 1000 - so an M with an overline is a million. Unicode encodes numerals U+2160 through U+2188 including the overlined forms, but most converters (including this one) stick with 1-3999 using the base ASCII letters.

Where Other Tools Do It Better

For large-scale programmatic conversion, a one-liner in your language of choice is easier: Python's roman package, the numerals-roman crate in Rust, or a dozen Stack Overflow snippets in JavaScript. Microsoft Excel has ROMAN() and ARABIC(), though Excel's ROMAN accepts a second argument that selects between five style variants (classic, concise, and so on) which is more than most users need. For overlined vinculum forms or medieval variants like the apostrophus, no browser tool offers full fidelity; you would want a typesetting system like LaTeX with a specialised package. This converter wins when you have a single value, want the answer in under a second, and do not want to leave the browser.

Frequently Asked Questions

Why is the range limited to 1-3999?

With only seven basic glyphs (I, V, X, L, C, D, M) and the rule that a glyph can repeat at most three times, the largest representable value is MMMCMXCIX = 3999. To go higher the Romans used the <em>vinculum</em>, a horizontal bar over a glyph to multiply by 1000, and the <em>apostrophus</em> for even larger values; neither is part of modern ASCII Roman numeral conventions. The tool sticks with the 1-3999 range most software and style guides expect.

What about zero and negative numbers?

Roman civilisation had no glyph for zero, a concept that arrived in Europe with Hindu-Arabic numerals via Fibonacci. Negative numbers also had no representation. The tool rejects both 0 and negatives at the input stage rather than inventing a non-standard encoding. If you need to represent the absence of something in a Roman-numeral context, style guides recommend leaving the position blank or using the word <em>nulla</em>.

Are the inputs ever transmitted?

No. The converter is a Preact island that runs its parser and emitter entirely in your tab. No network request carries the value you typed, no analytics event captures it, and no storage persists it across sessions. The clipboard write at Copy time is a local browser API, not a server call.

Why is IIII on a clock face but IV here?

Clock-face convention uses IIII at the 4 position for symmetry with the VIII at the 8 position, so the dial reads with visual balance. This is cosmetic and non-standard by the strict subtractive rule codified by the Roman calendar and most style guides (Chicago Manual of Style, MLA). The converter emits the standard IV; if you need IIII for a clock mockup, hand-edit the output.

How does the parser reject invalid numerals like IIII or VV?

After a left-to-right scan that sums values (treating a smaller symbol before a larger one as a subtraction), the parser runs a regex-based validation pass. It checks that I, X, and C repeat at most three times consecutively, that V, L, and D appear at most once, and that the only allowed subtractive pairs are IV, IX, XL, XC, CD, and CM. An input like IIII fails the repetition check; VV fails the single-occurrence check for V.

What if I paste lowercase roman numerals like mmxxiv?

The parser normalises to uppercase before evaluating, so mmxxiv is treated as MMXXIV and returns 2024. The output is always shown in canonical uppercase because that matches the overwhelming typographic convention for display; if you want lowercase output, convert with a text transform after copying.

Does the converter handle overlined (vinculum) forms?

No. The overline notation (a horizontal bar above a glyph to multiply by 1000) is a Unicode combining character or a typographic decoration, and its support across fonts and clipboards is inconsistent. For very large Roman numerals you need a typesetting system (LaTeX with the <em>romannum</em> package, or a Unicode-aware editor that honours U+0305 combining overline).

Is there a Unicode numeral for the Romans?

Yes - U+2160 through U+2188 encode Roman numerals I through L and various ligatures and archaic forms. Most systems render them as regular Latin letters anyway because visually they are identical. The converter outputs the plain ASCII letters because they render identically in every font and copy-paste cleanly. If you specifically need the Unicode code points, substitute them after copying.

Why use a greedy algorithm for conversion?

The symbol table (M, CM, D, CD, ..., I) is constructed so that at every step the largest applicable value produces a unique canonical numeral. A greedy subtraction from the remaining value is both the simplest and the correct algorithm; no lookahead or backtracking is needed. Non-greedy approaches exist but would produce non-canonical outputs like VIIII.

Can I convert a year like 2024 and paste the result into a credit?

Yes. 2024 emits as MMXXIV. For years beyond 3999 (if you are crediting an optimistic distant future film), the tool will refuse; otherwise the output is ready to paste into a title card, a copyright line, or a wedding invitation. Film and TV copyright dates in Roman numerals are the single most common real-world use case.

Is this a roman numeral calculator or only a converter?

It is a converter, not a calculator. A Roman numeral calculator would let you do arithmetic in Roman form (XII + IV = XVI). This tool converts numbers to Roman numerals and Roman numerals to numbers, so to add two numerals you would convert each to a decimal, add them in decimal, then convert back. That is faster and more reliable than tracking subtractive notation through a long-form sum.

Can it convert numbers to roman numerals in either direction in the same session?

Yes. Use the tab toggle at the top to switch between number-to-Roman-numeral and Roman-numeral-to-number conversion. Round-tripping a value through both directions returns the canonical form, which is useful as a sanity check when you are not sure whether an input like xiv is well-formed.

More Math & Calculators