罗马数字转换器公式

Roman Numeral Conversion

Roman Numeral Symbols

SymbolValue I1 V5 X10 L50 C100 D500 M1000

Rules

1. Symbols are generally written from largest to smallest, left to right 2. If a smaller symbol appears before a larger one, subtract it (e.g., IV = 4, IX = 9) 3. The same symbol can be repeated up to 3 times in a row

Example: 2024 = MMXXIV

  • 2000 = MM
  • 20 = XX
  • 4 = IV
  • 计算示例

    Convert 2024 to Roman numerals.

    1. Thousands: floor(2024/1000) = 2 → MM
    2. Hundreds: floor(24/100) = 0 → (none)
    3. Tens: floor(24/10) = 2 → XX
    4. Ones: 4 → IV
    5. Result: MMXXIV