Roman Numeral Converter

JJ Ben-Joseph headshot JJ Ben-Joseph

Choose a conversion direction to see the result.

The Legacy of Roman Numerals

Roman numerals express numbers using combinations of seven Latin letters: I (1), V (5), X (10), L (50), C (100), D (500), and M (1000). Placing a smaller value before a larger one indicates subtraction, while placing it after indicates addition. The calculator supports values from 1 to 3999, covering the range used on clocks, book chapters, and movie titles.

Mathematical Description

Converting a number n into Roman form involves decomposing it into the largest allowed symbols. Formally, we choose coefficients a k for each Roman value r k such that n = k = 1 m a k r k subject to the Roman system’s subtraction rules. The greedy algorithm used here always subtracts the largest possible value, guaranteeing a canonical numeral.

Sample Conversions

Use the table to test the converter or to memorize common numerals.

Number Roman numeral
4 IV
9 IX
42 XLII
99 XCIX
2024 MMXXIV

Practical Uses

Designers often combine Roman numerals with modern typography for a classical look. Educators rely on them when teaching history, music theory, and mathematics. For base conversions beyond Roman numerals, try the base-N converter or explore text formatting with the word counter tool. Together, these utilities simplify everyday number translations.

Roman numeral rules (the part most people forget)

Roman numerals are not just “add the letters up.” The system has rules that keep the representation readable and mostly unambiguous. This converter follows the common modern conventions you see in books, clocks, and outlines:

These conventions are why 4 is IV (not IIII) and why 90 is XC (not LXXXX). Some older inscriptions and watch faces do use non-standard styles, but the canonical style is the most widely recognized and the easiest to teach.

Symbol reference table

If you are learning the system, it helps to memorize the “building block” values that appear in canonical numerals. The converter’s internal mapping uses these pairs, which include the subtractive combinations:

Roman numeral building blocks
Value Symbol Note
1000MOne thousand
900CM1000 − 100
500DFive hundred
400CD500 − 100
100COne hundred
90XC100 − 10
50LFifty
40XL50 − 10
10XTen
9IX10 − 1
5VFive
4IV5 − 1
1IOne

How “To Roman” works (greedy decomposition)

To convert an integer into a canonical Roman numeral, you repeatedly subtract the largest value you can represent next. This is called a greedy algorithm: it always takes the biggest valid “coin” first. For standard Roman symbols, the greedy method yields the canonical representation.

In MathML, the idea looks like building a sum of Roman building-block values that equals the original integer:

n = k=1 m ak rk

where each rk is one of the allowed Roman values (1000, 900, 500, …, 1) and ak is how many times that value is used in sequence. In everyday terms, you’re decomposing the number into thousands, hundreds, tens, and ones while respecting subtraction rules.

Worked conversion example: 1987 → MCMLXXXVII

A short walkthrough makes the greedy method intuitive. Starting with 1987:

Concatenate the symbols in order: M + CM + L + XXX + V + II = MCMLXXXVII.

How “To Number” works (validation and parsing)

Converting from Roman numerals back to a number is trickier because you want to reject malformed strings. The converter scans from left to right, matching the same symbol map used for “To Roman” (including subtractive pairs like IV and CM). Each match adds a value and advances a cursor. If the cursor does not land exactly at the end, the numeral is treated as invalid.

This approach helps catch common mistakes such as illegal letters, wrong ordering, or partial matches. It does not try to accept every historical variation. That is intentional: for a learning tool and most practical uses, consistency beats permissiveness.

Why the range is 1 to 3999

In standard modern Roman numerals (without special overbar notation), 3999 is the upper limit: MMMCMXCIX. Larger numbers are often written using a bar above the numeral to indicate multiplication by 1000 (for example, V̅ for 5000). Overbars are hard to represent reliably in plain text fields and are not consistently supported across fonts, keyboards, and accessibility tools. Keeping the range 1–3999 makes the tool predictable and matches how Roman numerals are typically used in everyday documents.

Everyday tips

Related learning tools

If you are studying number systems, keep going with the base-N converter, practice place value with the Scientific Notation Converter, or explore arithmetic with the Percentage Calculator. Building comfort with representation and conversion is a fast way to reduce mistakes in math and data work.

Historical and stylistic variants

Roman numerals were used for centuries across many contexts, so you will occasionally see forms that differ from the “canonical” modern rules. Some clocks use IIII instead of IV for four; some inscriptions omit subtractive notation entirely; and some publishers follow house styles for page numbering. These styles are not “wrong” in a historical sense, but they are inconsistent in modern reading and can be ambiguous for automated parsing.

This converter intentionally chooses the canonical format because it is what most readers recognize today and it keeps conversions predictable. If you encounter a non-standard numeral, a good strategy is to interpret it visually (what value does it intend?) and then convert it back using this tool to normalize the representation.

Quick FAQ

Why does the converter reject some strings that “look Roman”? Because Roman numerals have ordering and repetition rules. Rejecting malformed inputs helps prevent silent mistakes.

Can I type lowercase letters? Yes—input is normalized to uppercase before parsing.

Can this handle 0 or negative numbers? Not in standard Roman numerals. The supported range is 1–3999.

Is the result unique? Under the canonical rules used here, yes: every integer in range has exactly one standard numeral.

What about overbars for large numbers? Some systems use an overbar to mean “times one thousand” (for example, V̅ = 5000). Overbars can be difficult to enter and render consistently across browsers, fonts, and assistive technologies, so this converter focuses on the plain-text range most commonly used in modern documents.

Embed this calculator

Copy and paste the HTML below to add the Roman Numeral Converter - Translate Numbers Instantly to your website.