Skip to main content
UtilitiesFree · no sign-up

Roman Numeral Converter

Numbers to Roman numerals and back, using the standard subtractive notation.

Updated

Which way?

A whole number from 1 to 3999. There is no Roman zero and no Roman negative.

In Roman numerals

MMXXVI

2,026 written the standard way

Number
2,026
Numeral
MMXXVI
Letters
6
Adds up as
1000 + 1000 + 10 + 10 + 5 + 1

M = 1000, M = 1000, X = 10, X = 10, V = 5, I = 1. Each rung is used at most three times in a row, and the six subtractive pairs (IV, IX, XL, XC, CD, CM) exist precisely so a fourth repeat is never needed.

Advertisement

In short

Why do Roman numerals stop at 3999?

Because M is the largest letter and no letter may repeat more than three times, so MMMCMXCIX — 3999 — is the end of the road. Going higher needs the vinculum, an overbar that multiplies a letter by 1000, and plain ASCII cannot type it. That is why this converter covers 1 to 3999 and refuses anything outside it.

There is also no zero and no negative. The system has no symbol for an empty column, which is exactly what makes long multiplication in Roman numerals so painful.

How to use the roman numeral converter

Type a number and get its numeral, or type a numeral and get its number. The breakdown row underneath shows the addition the letters stand for, which is the part worth reading: 1994 is MCMXCIV because it is 1000 plus 900 plus 90 plus 4, and each of those last three is a subtractive pair rather than a run of repeats.

The seven letters never change value. I is 1, V is 5, X is 10, L is 50, C is 100, D is 500 and M is 1000. Everything else in the system is a rule about the order you may put them in, and there are only two rules that matter.

  1. 1

    Larger before smaller means add

    Reading left to right, values normally descend and you total them up. MMXXVI is 1000 plus 1000 plus 10 plus 10 plus 5 plus 1, which is 2026.

  2. 2

    Smaller before larger means subtract

    A smaller letter placed before a larger one is taken away from it. IV is 4 and IX is 9, which is how the system avoids ever writing four of the same letter in a row.

  3. 3

    Only I, X and C may subtract

    And only from the next two values up. So IV, IX, XL, XC, CD and CM are the complete list of six legal pairs. V, L and D never subtract from anything.

Advertisement

That short list is why this converter rejects rather than guesses. IIII breaks the repeat rule, VX puts a five-letter in front of a larger one, and IC tries to subtract across two orders of magnitude at once. Every one of them has an obvious intended meaning, and none of them is how the number is written.

Do

  • Read a numeral left to right, adding unless a smaller letter sits before a larger one.
  • Use the six subtractive pairs so no letter ever repeats four times.
  • Check any numeral you plan to carve, print or tattoo before it becomes permanent.
  • Expect IIII on a traditional clock dial and IV almost everywhere else.
  • Fall back on Arabic digits for anything above 3999.

Don't

  • Subtract from a letter more than two rungs up, which rules out IC and IM.
  • Put V, L or D in front of a larger letter, since none of the three ever subtracts.
  • Expect arithmetic to be easy in a system with no symbol for an empty column.
  • Read MCM as 1100 by adding the letters without checking their order.
  • Trust a converter that silently accepts a spelling it cannot produce itself.

The seven letters, the six subtractive pairs, and the spelling each pair exists to replace.

SymbolValueKindWhat it replaces
I1LetterNothing, it is the unit
IV4Subtractive pairIIII
V5LetterNothing
IX9Subtractive pairVIIII
X10LetterNothing
XL40Subtractive pairXXXX
L50LetterNothing
XC90Subtractive pairLXXXX
C100LetterNothing
CD400Subtractive pairCCCC
D500LetterNothing
CM900Subtractive pairDCCCC
M1000LetterNothing, and the largest available
Every numeral in this table is what the converter above produces, and every entry in the last column is a string it rejects.

So why does the clock on the wall say IIII?

Because clock dials follow a horological convention rather than the grammar this tool enforces, and they have done so for centuries. Look at almost any traditional dial with Roman hours and the four is written IIII, not IV, while every other hour on the same face follows the ordinary rules.

Several explanations get repeated, and they are worth separating from each other by how well they hold up. The visual argument is the strongest of them: IIII balances the VIII sitting opposite it, and the dial divides neatly into a first group using only I, a second using V, and a third using X.

What a IIII dial looks like
Hours 1 to 4
I, II, III, IIII
Hours 5 to 8
V, VI, VII, VIII
Hours 9 to 12
IX, X, XI, XII
Total I characters on the dial
20, cast as identical strokes

The casting argument follows from the same table: a mould producing four X, four V and twenty I fills a whole dial with no leftovers.

The famous counterexample is the Great Clock at Westminster, the dial usually called Big Ben, which uses IV. So the convention is a strong tendency rather than a law, and a numeral is not wrong for following either side of it. What is true is that IIII on a clock face is a real and long-standing exception to the rule this converter enforces everywhere else.

Treat it the way you would any craft convention. If you are labelling chapters, dating a film, or checking a monument inscription, use the standard subtractive form the tool produces. If you are designing a watch face, IIII is the traditional choice and nobody in horology will blink at it.

Numbers written in other bases

Roman numerals are one of several ways to write the same quantity. The base converter shows a value in binary, octal, decimal, hexadecimal and any base up to 36 at once.

Open the base converter

What the system genuinely cannot express

Roman numerals are additive rather than positional, and that single difference explains every limitation. There is no column that could be empty, so there is nothing for a zero to mark and no symbol was ever needed for one. The Romans handled the idea of nothing with the word nulla when they had to write it at all.

There are no negative numbers either, and no fractions in the letter system. Roman fractions existed but used a separate duodecimal notation based on twelfths, with its own symbols, which is a different system rather than an extension of this one.

3999

The largest value

written MMMCMXCIX in 9 letters

15

The longest numeral

3888 is MMMDCCCLXXXVIII

7

Letters in the whole system

I, V, X, L, C, D, M

The 3999 ceiling is the practical one. Roman writers did have ways past it: the vinculum drew a bar over a letter to multiply it by 1000, so a barred X meant ten thousand, and an earlier apostrophus notation used enclosing marks for the same job. Neither survives as plain typeable text.

That is why this converter stops where it does. Emitting a barred M would mean choosing between a combining overline character that renders inconsistently, an image, or a made-up convention, and none of those is something you could paste into a document and trust. A clean refusal at 3999 is more honest than a numeral that looks different everywhere it is displayed.

Advertisement

The formula, worked line by line

Encoding is a single greedy pass down a ladder of thirteen rungs. The ladder holds the seven letters and the six subtractive pairs together in descending value order, and the pairs sit between the letters at exactly the values they represent. Take the largest rung that fits, subtract it, repeat.

Putting the pairs on the same ladder as the letters is what makes the greedy pass correct. When the algorithm reaches 4 it finds the IV rung before it finds the I rung, so it can never emit IIII, and the same holds at 9, 40, 90, 400 and 900.

ladder = 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
encode: take the largest rung that fits, append its symbol, subtract its value, repeat
decode: sum each letter, but subtract any letter smaller than the one after it
valid = M{0,3} then (CM | CD | D?C{0,3}) then (XC | XL | L?X{0,3}) then (IX | IV | V?I{0,3})
accepted only if encode(decode(input)) is identical to the input
The six subtractive pairs and what each replacesStandard Roman notation has 6 subtractive pairs: CM is 900, CD is 400, XC is 90, XL is 40, IX is 9, IV is 4. Each one exists so a letter never has to repeat four times, which is why DCCCC, CCCC, LXXXX, XXXX, VIIII, IIII are all invalid. The system runs from 1 to 3,999 and 1,994 is written MCMXCIV.SMALLER BEFORE LARGER = SUBTRACTCM= 900DCCCCCD= 400CCCCXC= 90LXXXXXL= 40XXXXIX= 9VIIIIIV= 4IIIIno letter repeats four times; only I, X and C ever subtract1,994 = MCMXCIVM1,000CM900XC90IV4
The six subtractive pairs, and the four-in-a-row spelling each one exists to outlaw.
Encoding 1994 one rung at a time
Start at 1994, take M
1000, leaving 994
CM fits before D does
900, leaving 94
XC fits before L does
90, leaving 4
IV fits before I does
4, leaving 0
1994
MCMXCIV

Four rungs, four symbols, no repeats. The same pass on 3888 produces MMMDCCCLXXXVIII, which at 15 letters is the longest numeral the whole range contains.

Decoding is the reverse scan, and on its own it is far too generous. A plain left-to-right sum with subtraction happily reports 4 for IIII and 99 for IC, because both strings do describe a coherent arithmetic even though neither is a legal spelling.

So the tool applies two gates. The grammar pattern above rejects malformed shapes outright, and then the parsed value is re-encoded and compared against what you typed. Only a string that survives both is accepted, which guarantees every input the tool takes is one it could have produced itself.

The range is small enough to verify exhaustively rather than argue about, so the test suite does exactly that. All 3999 values are encoded, decoded and compared back, producing 3999 distinct numerals with no collisions and no value that fails its own grammar.

Advertisement

Questions people ask

Why is IIII rejected when everyone knows it means 4?

Because 4 is written IV, and the whole point of the six subtractive pairs is that no letter ever needs to appear four times in a row. IIII is readable, it is historically attested, and it is still not standard notation, which is why this tool names the rule instead of quietly answering 4. The one place you will see it and should expect it is a traditional clock dial, where IIII is a long-standing horological convention. Anywhere else, from chapter headings to film copyright dates to monument inscriptions, IV is the correct spelling.

What is the largest number I can write in Roman numerals?

In standard ASCII notation, 3999, written MMMCMXCIX. The limit comes from two rules working together: M at 1000 is the largest letter available, and no letter may repeat more than three times, so MMM at 3000 plus the largest sub-thousand numeral CMXCIX at 999 is as far as it goes. Roman writers did go higher using the vinculum, an overbar that multiplies a letter by 1000, so a barred X meant ten thousand. There is no reliable way to type or display that in plain text, so this converter stops cleanly at 3999 rather than inventing a notation.

Is there a Roman numeral for zero?

No, and the system does not need one. Roman numerals are additive rather than positional, so there is no column that could sit empty and therefore nothing for a zero to mark. In our own notation the 0 in 205 exists purely to say that the tens column is empty, and a system that spells that number CCV has no such column to describe. When Roman writers needed the idea of nothing they used the word nulla. Negative numbers have no representation either, which is why this converter accepts only whole values from 1 to 3999.

Which letters can be subtracted, and from what?

Only I, X and C ever subtract, and each may subtract only from the next two values above it. That gives exactly six legal pairs: IV and IX for I, XL and XC for X, and CD and CM for C. V, L and D never subtract from anything, which is why VX and LC are invalid. The two-rung limit is the rule that rules out IC for 99, since C is four rungs above I. The correct spelling of 99 is XCIX, built as 90 plus 9, and the converter says so rather than guessing what you meant.

How do I read a long numeral like MCMXCIV quickly?

Break it at every point where a smaller letter sits before a larger one, then total the groups. MCMXCIV splits into M, CM, XC and IV, which is 1000 plus 900 plus 90 plus 4, giving 1994. The trick is that the splits are always pairs, never longer, so you are only ever looking one letter ahead. The breakdown row in the panel above does this for you on any numeral you paste in, and reading a few of those is a faster way to internalise the pattern than memorising a table of values.