Skip to content

RomanNumeral ​

The Roman numeral for a non-negative integer, as a string.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageRomanNumeral✓
RomanNumeral(n)the Roman numeral for 0≤n≤39990 \le n \le 3999, the largest with the standard symbols
Typed signatures
TypePackageApplies
(integer) -> stringnumeralsalways

Domain: Numeral systems

Details
  • Written subtractively: 4 is IV, not IIII; 1988 is MCMLXXXVIII
  • 0 is N, for the Latin nulla — Roman numerals otherwise have no zero

Examples

Basic #
live ↗
InRomanNumeral(1 988)\mathrm{RomanNumeral}(1\,988)OutMCMLXXXVIII\text{MCMLXXXVIII}
live ↗
InRomanNumeral(2 024)\mathrm{RomanNumeral}(2\,024)OutMMXXIV\text{MMXXIV}

A year, as a Roman numeral

live ↗
InRomanNumeral(2 023)\mathrm{RomanNumeral}(2\,023)OutMMXXIII\text{MMXXIII}
Scope #

the largest with standard symbols

live ↗
InRomanNumeral(3 999)\mathrm{RomanNumeral}(3\,999)OutMMMCMXCIX\text{MMMCMXCIX}

Listable; 4 is written subtractively

live ↗
InRomanNumeral([1,2,3,4])\mathrm{RomanNumeral}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack)Out[I,II,III,IV]\bigl\lbrack\text{I}, \text{II}, \text{III}, \text{IV}\bigr\rbrack

Threads over a list, with subtractive forms like IV

live ↗
InRomanNumeral([1,2,3,4,5,10,50,60,100,250,500,1 000,1 500,2 600])\mathrm{RomanNumeral}(\bigl\lbrack1, 2, 3, 4, 5, 10, 50, 60, 100, 250, 500, 1\,000, 1\,500, 2\,600\bigr\rbrack)Out[I,II,III,IV,"V",X,"L",LX,"C",CCL,D,M,MD,MMDC]\bigl\lbrack\text{I}, \text{II}, \text{III}, \text{IV}, "V", \text{X}, "L", \text{LX}, "C", \text{CCL}, \text{D}, \text{M}, \text{MD}, \text{MMDC}\bigr\rbrack

The first ten Roman numerals

live ↗
InRomanNumeral(1..10)\mathrm{RomanNumeral}(1..10)Out[I,II,III,IV,"V",VI,VII,VIII,IX,X]\bigl\lbrack\text{I}, \text{II}, \text{III}, \text{IV}, "V", \text{VI}, \text{VII}, \text{VIII}, \text{IX}, \text{X}\bigr\rbrack
Properties #

Near the upper limit of standard notation, 3749

live ↗
InRomanNumeral(3 749)\mathrm{RomanNumeral}(3\,749)OutMMMDCCXLIX\text{MMMDCCXLIX}

A typical four-digit conversion

live ↗
InRomanNumeral(1 234)\mathrm{RomanNumeral}(1\,234)OutMCCXXXIV\text{MCCXXXIV}

One less than 3749, differing in the last digits

live ↗
InRomanNumeral(3 748)\mathrm{RomanNumeral}(3\,748)OutMMMDCCXLVIII\text{MMMDCCXLVIII}
Possible issues #

zero is written N, for nulla

live ↗
InRomanNumeral(0)\mathrm{RomanNumeral}(0)Out"N""N"
About
Examples11
Checked againstWolfram Language 11 agree
CrosswalkWolfram Language

See also: IntegerString