Roman Numeral Converter

Convert between ordinary numbers and Roman numerals. Everything runs in your browser.

Advertisement

What the converter accepts

This tool reads an ordinary number and writes it in Roman numerals. The accepted range is 1 to 3999. Zero, negative values, decimals and anything from 4000 upwards return a short message rather than a numeral, because standard Roman notation has no zero and no agreed way to write four thousand without an overline or a repeated M.

Conversion is one-way. You supply digits and receive a string of capital letters. If you already have a numeral and need the number back, this page will not do it, and a numeral pasted into the input is treated as text rather than parsed.

The symbols and the subtraction rules

Seven symbols carry the whole system: I for one, V for five, X for ten, L for fifty, C for a hundred, D for five hundred and M for a thousand. Values are written largest first, and a smaller symbol placed before a larger one subtracts from it. Only six subtractive pairs are used in standard notation: IV for four, IX for nine, XL for forty, XC for ninety, CD for four hundred and CM for nine hundred.

The converter walks a fixed list of values from 1000 down to 1, each paired with its symbol, and appends the symbol as many times as it fits into the remainder. Because the list includes the subtractive pairs as separate entries, the output is always the canonical form: four is IV, never IIII, and nine hundred is CM, never DCCCC.

Worked example

Convert 1987. The largest value that fits is 1000, so the output starts with M and the remainder is 987. Next, 900 fits once, adding CM and leaving 87. Then 50 adds L and leaves 37, and 30 is three tens, adding XXX and leaving 7. Finally 5 adds V and 2 adds II, giving MCMLXXXVII.

The same procedure explains the awkward-looking cases. Four is IV because the value list reaches the pair before it reaches I, and forty is XL rather than XXXX. Three thousand nine hundred and ninety-nine is MMMCMXCIX, only nine characters, because the subtractive pairs keep it shorter than a naive stack of symbols. The longest output in the range belongs to 3888, which needs fifteen characters: MMMDCCCLXXXVIII. Nothing in the output is lowercase and nothing is spaced, so the result is safe to paste into a heading or a filename.

Limits and related tools

Capitalisation is fixed at uppercase. If a style guide wants mcmlxxxvii, paste the result into the case converter and switch it to lower case. The converter also offers no alternative notations, so clock-face four as IIII, additive forms such as XXXX for forty, and mediaeval variants are all out of reach by design.

For spelling numbers out as English words rather than Roman letters, the number to words tool covers zero to 999,999 and handles the wording that a numeral cannot, such as the and in one hundred and twenty-three. To measure the length of a converted numeral inside a longer piece of text, text statistics gives characters and words for the whole block.

Frequently asked questions

The range stops at 3999. Writing 4000 in standard notation needs an overline or a non-standard repeat, so the tool declines rather than inventing a form.
IV. The converter always produces the subtractive form. IIII appears on some clocks and buildings but is not the canonical notation used here.
No. Conversion runs from digits to numerals only. A numeral typed into the input is not parsed.
Convert first, then change the case of the output. The converter itself always returns uppercase letters.