FromRomanNumeral["string"]
gives the integer corresponding to the Roman numeral "string".
FromRomanNumeral
FromRomanNumeral["string"]
gives the integer corresponding to the Roman numeral "string".
Examples
open all close allBasic Examples (2)
Scope (3)
Roman numerals can be given in upper case, in lower case, or a mixture of both:
FromRomanNumeral["MMXV"]FromRomanNumeral["mmxv"]FromRomanNumeral["MMxv"]The numeral "N" represents the integer 0:
FromRomanNumeral["N"]FromRomanNumeral threads automatically over lists of numerals:
FromRomanNumeral[{"ci", "cii", "ciii", "civ", "cv", "cvi", "cvii", "cviii"}]Properties & Relations (2)
RomanNumeral converts a decimal integer into its Roman numeral form:
RomanNumeral[1234]FromRomanNumeral[%]FromRomanNumeral["string"] is equivalent to FromDigits["string","Roman"]:
FromRomanNumeral["MMMDCCXLVIII"]FromDigits["MMMDCCXLVIII", "Roman"]Possible Issues (1)
FromRomanNumeral can interpret nonstandard forms of Roman numerals:
FromRomanNumeral["xcix"]FromRomanNumeral[{"ic", "lil", "lxxxxix", "xxxxxxxxxix", "xxxxxxxxxiiiiiiiii"}]In fact, any combination of valid digits is interpreted as an integer:
digits = {"I", "V", "X", "L", "C", "D", "M"}StringJoin[RandomChoice[digits, 6]]FromRomanNumeral[%]To check whether a given roman numeral is written in canonical form, compare to the output of RomanNumeral:
RomanNumeral[%]See Also
Related Guides
History
Text
Wolfram Research (2015), FromRomanNumeral, Wolfram Language function, https://reference.wolfram.com/language/ref/FromRomanNumeral.html.
CMS
Wolfram Language. 2015. "FromRomanNumeral." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FromRomanNumeral.html.
APA
Wolfram Language. (2015). FromRomanNumeral. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FromRomanNumeral.html
BibTeX
@misc{reference.wolfram_2026_fromromannumeral, author="Wolfram Research", title="{FromRomanNumeral}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FromRomanNumeral.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fromromannumeral, organization={Wolfram Research}, title={FromRomanNumeral}, year={2015}, url={https://reference.wolfram.com/language/ref/FromRomanNumeral.html}, note=[Accessed: 12-June-2026]}