{"docs_daily":{"tools":{"roman":{"content":{"title":"Converting numbers to Roman numerals: rules and a worked example","intro":"Roman numerals combine seven symbols (I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1,000) that are added up, except when a smaller symbol stands before a larger one: it is then subtracted (IV = 4, CM = 900). The converter works both ways for numbers from 1 to 3,999, the ceiling of the notation without an overline.","details":"
From number to Roman, the tool walks through a table of 13 values from largest to smallest: M (1,000), CM (900), D (500), CD (400), C (100), XC (90), L (50), XL (40), X (10), IX (9), V (5), IV (4), I (1). As long as the remainder is greater than or equal to a value, it writes the symbol and subtracts the value. The six subtractive pairs (CM, CD, XC, XL, IX, IV) give the standard form: 4 is written IV, never IIII.
Example: 1994 = 1,000 + 900 + 90 + 4, i.e. M + CM + XC + IV = MCMXCIV. Likewise 2026 gives MMXXVI and 3,999 gives MMMCMXCIX.
From Roman to number, the tool reads left to right: if the next letter is worth more than the current one, it adds the difference (C then M = 900); otherwise it adds the letter's value. MCMXCIV turns back into 1994.