Skip to content
cosmodev ~/tools/roman-numeral-converter

Convertor cifre romane

Converters & Formatters

Convertiți între numere întregi (1-3999) și cifre romane în formă standard. Validează forma canonică, rulează integral în browser, cu un link partajabil către exact datele introduse.

Try:
Numeral roman
Tastează un număr pentru a-i vedea numeralul roman.

(Documentație în engleză)

What it does

Converts integers (1 to 3,999,999) to Roman numerals and back. Values above 3,999 use vinculum notation: a bar over a symbol multiplies its value by 1,000, so the range extends a thousandfold. Every input is validated against the canonical form, so IIII, VV, IC, and plain MMMM are rejected with a clear message. The breakdown panel shows exactly how each result was built, step by step.

How to use it

  1. Pick a direction: Number → Roman or Roman → Number. A valid value carries across the switch, so you can convert back without retyping.
  2. Type or paste a value. You can also tap an example chip.
  3. The result appears in large type. Below it, the Breakdown panel lists each greedy step with its value. Copy the result, the breakdown, or a share link to your exact input.

Examples

Number Roman Note
44 XLIV 40 + 4
1994 MCMXCIV 1,000 + 900 + 90 + 4
3,999 MMMCMXCIX the largest plain numeral
4,000 I̅V̅ first vinculum value: IV x 1,000
1,234,567 M̅C̅C̅X̅X̅X̅I̅V̅DLXVII overlined 1,234 + plain 567
3,999,999 M̅M̅M̅C̅M̅X̅C̅I̅X̅CMXCIX the largest value the tool accepts

How Roman numerals work

Roman numerals use seven letters. That is the entire system:

Symbol I V X L C D M
Value 1 5 10 50 100 500 1,000

Two rules produce every canonical numeral:

  1. Additive rule. Read left to right and add. VIII is 5 + 1 + 1 + 1 = 8. Bigger letters come first.
  2. Subtractive rule. A smaller letter placed before a larger one subtracts. IV is 5 - 1 = 4, CM is 1,000 - 100 = 900. Exactly six pairs are legal: IV (4), IX (9), XL (40), XC (90), CD (400), CM (900). The rule exists to keep numerals short and each value’s spelling unique: 4 is IV, never IIII.

The conversion algorithm is ten lines. Put the 13 values largest-first in one table (the seven letters plus the six subtractive pairs), then walk it greedily:

VALUES = [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]

to_roman(n):
    result = ""
    for (value, symbol) in VALUES:      # largest first
        while n >= value:
            result += symbol
            n -= value
    return result

For 1994 that walk emits M (1,000), then CM (900), then XC (90), then IV (4). That is exactly the breakdown panel. Parsing runs the same logic in reverse: scan left to right, subtract when a smaller letter precedes a larger one, then re-render the total and compare. Any spelling that survives the round-trip is canonical, which is how IIII and IC get rejected with one check.

Above 3,999: the vinculum. The letters stop at M = 1,000, so classical usage capped at 3,999. The medieval vinculum extends the system: an overline multiplies a symbol by 1,000 (V̅ = 5,000, M̅ = 1,000,000). The canonical form renders the thousands part with the same greedy table, then bars every glyph: 4,000 is I̅V̅ (4 x 1,000), and 3,999,999 is the overlined MMMCMXCIX followed by the plain remainder CMXCIX. The tool carries the bar as a combining character (U+0305), so the numeral copies and parses as ordinary text. A pasted macron (U+0304, visually near-identical) is accepted and normalized.

Good to know

  • Canonical only. One accepted spelling per value. Non-canonical input is rejected, not guessed.
  • Strict range. 1 to 3,999,999. Above that, medieval writers stacked a second bar (x 1,000,000); the tool stops at one.
  • Private: all conversion runs locally in your browser. Nothing is sent anywhere.
  • Related tools: Number Base Converter, Bitwise Calculator.
Cod sursă14 limbi

100% pe partea clientului · datele tale nu părăsesc niciodată browserul. Ți s-a părut util? Partajează-l cu un coleg.