Convert integers (1–3999) to Roman numerals and decode Roman numerals back to Arabic numbers. Full reference table included.
IIII appears on clock faces all over Europe, and it is not a canonical Roman numeral. That gap between what people write and what the system defines is the interesting part of converting them, and the Roman Numeral Converter takes the strict line in both directions: it only ever emits the canonical form, and it only accepts the canonical form.
Going from digits to numerals is a greedy pass over 13 value-symbol pairs, subtracting the largest that still fits and appending its symbol. The six subtractive pairs CM, CD,XC, XL, IX and IVsit in that table alongside the plain letters, which is why 4 becomes IV rather than IIII without any special case.
The reverse direction sums letters, treating a smaller value before a larger one as a subtraction, and then re-encodes the answer and compares it against what you typed. Anything that fails that round trip is rejected. A reference grid of 26 values sits below, and clicking any row loads that number into the converter.
With Number → Roman selected, type 2026. The greedy pass takes M twice for 2000, then Xtwice for 20, then V and I, giving MMXXVI. Press the swap arrow, paste MMXXVIback, and 2026 returns. Try 3999 for the largest value the system can express, MMMCMXCIX, which uses 3 of the subtractive pairs in a single numeral.
Ms, which the canonical form forbids. Out-of-range input returns Enter a whole number between 1 and 3999.IIII as 4 and IM as 999, returning a confident wrong answer for a typo. The round-trip check catches both, and the message names the rule: only in standard form — e.g. "IV" not "IIII".mmxxvi is accepted and echoed back in capitals.2,026 and surprising for -5, which loses its sign and returns V.M D C L X V I are recognised. The Unicode Roman numeral glyphs such as Ⅻ are separate code points and will not decode.Roman Numeral Reference