Math

Roman Numeral Converter

Convert numbers to Roman numerals and Roman numerals back to numbers.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Result MMXXVI
Results

About this calculator

Roman numerals use seven symbols and work by addition, except when a smaller symbol precedes a larger one, which means subtraction. The largest value expressible in standard form is 3,999.

Worked example

calculated with the default values below

Number or Roman numeral 2026 · Direction Number to Roman Result MMXXVI · Decimal value 2,026 · Symbols used 6

General background references

Disclaimer

These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

n₀ = n; v_j = max{v ∈ V ∶ v ≤ n_{j−1}}; n_j = n_{j−1} − v_j (j = 1,…,m); n_m = 0; R = s₁s₂⋯s_m; N = Σ_{k=1}^{ℓ} q_k v_k; q_k = {−1, v_k < v_{k+1}; 1, v_k ≥ v_{k+1}}; v_{ℓ+1} = 0

n
Decimal integer 1–3999
V
Table value set {1,4,5,9,10,40,50,90,100,400,500,900,1000}
j
Encoding step, 1 ≤ j ≤ m
v_j
Largest value in V with v_j ≤ n_{j−1}
s_j
Table symbol paired with v_j (I, IV, V, …, M)
n_j
Remainder after step j, n_j = n_{j−1} − v_j
m
Number of symbols in R; n_m = 0
R
Roman numeral: concatenation s₁s₂⋯s_m
k
Position in the input numeral, 1 ≤ k ≤ ℓ
ℓ
Number of input symbols
v_k
Value of the kth input symbol I,V,X,L,C,D,M
q_k
−1 before a larger value, otherwise +1
v_{ℓ+1}
Sentinel 0, so the last symbol has q_ℓ = 1
N
Decoded number

Canonical Roman numerals only, from I to MMMCMXCIX (1–3999); invalid forms such as IIII and IC are rejected.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Which Roman numerals are accepted?

The converter accepts canonical Roman numerals from I through MMMCMXCIX (1–3999). Noncanonical forms such as IIII or IC and values outside that range are rejected.