Konverter Angka Romawi
Converters & FormattersKonversikan antara bilangan bulat (1-3999) dan angka Romawi bentuk standar. Memvalidasi bentuk kanonik, berjalan sepenuhnya di browser Anda, dengan tautan yang dapat dibagikan untuk input persis Anda.
Ketik angka untuk melihat angka Romawinya.(Documentation in English)
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
- Pick a direction: Number → Roman or Roman → Number. A valid value carries across the switch, so you can convert back without retyping.
- Type or paste a value. You can also tap an example chip.
- 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:
- Additive rule. Read left to right and add.
VIIIis 5 + 1 + 1 + 1 = 8. Bigger letters come first. - Subtractive rule. A smaller letter placed before a larger one subtracts.
IVis 5 - 1 = 4,CMis 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 isIV, neverIIII.
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.