Converters
Roman Numerals Explained: Convert Numbers Both Ways (Up to 3,999,999)
Understand how Roman numerals work, the subtractive rules, and the vinculum trick that lets you convert numbers up to 3,999,999 both ways.
Try the toolRoman Numeral Converter →The problem with Roman numerals
Roman numerals show up in more places than you would expect: movie copyright years, book chapters, Super Bowl branding, clock faces, and API version tags. But reading MCMXCIV at a glance, or writing 2026 correctly, is not something most of us do daily. The rules are simple once you know them, yet easy to get subtly wrong — and a single misplaced symbol changes the value entirely.
A converter removes the guesswork in both directions: number to numeral, and numeral back to number.
How the system works
Roman numerals are built from seven letters, each with a fixed value:
I= 1,V= 5,X= 10,L= 50C= 100,D= 500,M= 1000
You build a number by adding symbols from largest to smallest: MMXXVI is 1000 + 1000 + 10 + 10 + 5 + 1 = 2026. To avoid four repeats in a row, the system uses subtractive notation: a smaller symbol placed before a larger one is subtracted. So 4 is IV (not IIII), 9 is IX, 40 is XL, and 90 is XC. Only powers of ten (I, X, C) may be used subtractively, and only before the next one or two higher symbols.
There is no symbol for zero and no way to write negative numbers — the Romans simply had no concept of either in this system.
Going beyond 3,999
With only these letters, the largest value you can write is MMMCMXCIX = 3999. To reach higher, the classical system uses the vinculum: a bar over a numeral multiplies it by 1,000. So an overlined V equals 5,000 and an overlined M equals 1,000,000. That extends the range all the way up to 3,999,999, which is why a full-featured converter supports numbers that large.
A practical walkthrough
Here is the core add-then-subtract algorithm that any converter uses, expressed in JavaScript:
function toRoman(num) {
const map = [
[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"]
];
let result = "";
for (const [value, symbol] of map) {
while (num >= value) {
result += symbol;
num -= value;
}
}
return result;
}
toRoman(2026); // "MMXXVI"
toRoman(1994); // "MCMXCIV"Decoding works in reverse: scan left to right, and subtract instead of add whenever a symbol is smaller than the one after it. Rather than hand-rolling this every time, paste a value into the Roman Numeral Converter and get an instant, validated result in either direction — entirely in your browser.
Common pitfalls and tips
- No four-in-a-row: Write 4 as
IV, notIIII, and 900 asCM, notDCCCC. Clock faces that showIIIIare a stylistic exception, not correct notation. - Only valid subtractions:
ILfor 49 is wrong; the correct form isXLIX. Subtraction only pairs a symbol with the next one or two sizes up. - Zero and decimals: There is no Roman zero and no fractional support — inputs must be whole numbers of at least 1.
- Case: Numerals are conventionally uppercase; a good converter accepts lowercase input but normalizes the output.
If you are working with other numbering systems too, the Number Base Converter handles binary, octal and hex, and Text to Binary covers character encodings.
Conclusion
Roman numerals follow a tidy set of additive and subtractive rules, plus the vinculum for large values. Knowing them lets you verify a converter's output and catch the classic mistakes — illegal repeats and invalid subtractions. When you just need the answer fast and correct, a converter does the arithmetic so you can move on.