# Roman Numeral Converter

URL: https://hifreetools.com/calculators/roman-numeral-converter

> Convert any whole number from 1 to 3999 into Roman numerals, and decode Roman numerals back into ordinary integers, instantly in your browser.

## Quick answer

To convert a number to Roman numerals, subtract the largest possible value symbol repeatedly (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) and append each symbol. For example, 2024 becomes MMXXIV and 1984 becomes MCMLXXXIV. To decode, add each symbol's value, subtracting when a smaller symbol precedes a larger one. Standard Roman numerals cover only 1 through 3999.

The converter works in two directions. To encode an integer, it walks a fixed value table from largest to smallest — [1000=M, 900=CM, 500=D, 400=CD, 100=C, 90=XC, 50=L, 40=XL, 10=X, 9=IX, 5=V, 4=IV, 1=I] — and while the remaining number is at least the current value it appends that symbol and subtracts the value. This greedy method always yields the shortest, standard subtractive form. To decode, it scans the numeral left to right, adding each symbol's value, but when a symbol is smaller than the one after it (for example I before X), it subtracts instead, capturing subtractive pairs like IV and CM. The result is validated by re-encoding it: if re-encoding does not reproduce the exact input, the numeral is malformed (for example IIII, VV, or IC) and is rejected. Only values from 1 to 3999 are accepted, the range expressible with standard ASCII Roman numerals.

## Examples

- Convert 2024 to Roman numerals: Number: 2024 → MMXXIV
- Convert 1984 to Roman numerals: Number: 1984 → MCMLXXXIV
- Convert 49 to Roman numerals: Number: 49 → XLIX
- Decode MMXXIV to a number: Roman numeral: MMXXIV → 2024
- Convert 3999 (the maximum): Number: 3999 → MMMCMXCIX

## FAQ

**What is the largest number this converter supports?**
3999, written MMMCMXCIX. Standard ASCII Roman numerals top out here because 4000 and above require an overline (vinculum) over symbols to multiply them by 1000, which is not part of the basic letter set.

**Is there a Roman numeral for zero?**
No. The Roman system has no symbol for zero, so it can only represent whole numbers from 1 upward. Around 725, Bede or a colleague used N (for 'nulla', none) for zero in tables, but it was never a numeral.

**Why is 4 written IV and not IIII?**
Standard subtractive notation places a smaller symbol before a larger one to mean 'one less,' so IV is 5 minus 1. Writing IIII is an additive variant still seen on some clock faces, but it is non-standard and this tool returns the modern IV form.

**Why can't I write 49 as IL?**
Subtraction is only allowed with specific pairs: I before V or X, X before L or C, and C before D or M. Since I cannot precede L, 49 is built as 40 (XL) plus 9 (IX), giving XLIX.

**Does the converter handle lowercase Roman numerals?**
Yes. When decoding, lowercase letters such as 'mcmlxxxiv' are accepted and treated the same as uppercase, since case carries no meaning in Roman numerals.

**How does the tool know a Roman numeral is invalid?**
After decoding a numeral to a number, it re-encodes that number back to standard form and compares. If the result does not exactly match what you typed, the numeral is malformed (like IIII, VV, or XM) and the tool reports it as invalid.


## Sources

- [Wikipedia — Roman numerals](https://en.wikipedia.org/wiki/Roman_numerals)
- [Encyclopaedia Britannica — Roman numeral](https://www.britannica.com/topic/Roman-numeral)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Roman Numeral Converter", https://hifreetools.com/calculators/roman-numeral-converter
