How Roman numerals work
Roman numerals build numbers from seven letters: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000. Most values are written largest-to-smallest and added together, but to avoid four-in-a-row a smaller letter placed before a larger one is subtracted.
So IV is 5−1 = 4 and IX is 10−1 = 9. The converter applies these rules greedily from the largest value down, which always yields the canonical form.
Worked example
Converting 2026:
MMXXVI.Rules and limits
Standard Roman numerals only have the subtractive pairs IV, IX, XL, XC, CD and CM, and no letter repeats more than three times in a row. There's no zero and no native way to write fractions, and the conventional range is 1 to 3999 (MMMCMXCIX) — larger numbers historically used an overline to multiply by 1000, which this tool doesn't use.