Purpose

Return value

Syntax

=ARABIC(roman_text)
  • roman_text - The Roman numeral in text that you want to convert.

Using the ARABIC function

The ARABIC function converts a Roman numeral to a number in Arabic numeral form. The result from ARABIC is a numeric value.

ARABIC takes just one argument, roman_text , which should be a Roman number provided as a text string . For example, the formula below converts “VII” to the number 7:

 =ARABIC("VII") // returns 7

Other examples

 =ARABIC("L") // returns 50
 =ARABIC("C") // returns 100
 =ARABIC("M") // returns 1000
 =ARABIC("MM")+1 // returns 2001

The ROMAN function performs the opposite conversion:

=ROMAN(2021) // returns "MMXXI"
=ARABIC("MMXXI") // returns 2021

Roman numbers

The table below lists available Roman numbers with their equivalent Arabic number value.

SymbolValue
I1
V5
X10
L50
C100
D500
M1000

Notes

  • The maximum length of roman_text is 255 characters.
  • The ARABIC function performs the opposite conversion as the ROMAN function .
  • If roman_text is not recognized as a Roman number, ARABIC returns #VALUE!
  • ARABIC can process Roman numbers in upper or lower case.

Purpose

Return value

Syntax

=BASE(number,radix,[min_length])
  • number - The number to convert to a given base.
  • radix - The base to convert to.
  • min_length - [optional] The minimum string length to return, achieved by padding with zeros.

Using the BASE function

The BASE function converts a number to a given base and returns the result as a text string . Base is specified with the radix argument.

The BASE function takes three arguments : number , radix , and min_length . Number should be an integer between 1 and 2^53. If number is negative, BASE returns a #NUM! error. The radix argument is used to specify base. Radix represents the number of digits used to represent numbers and should be an integer between 2 and 36. The optional min_length argument is the minimum string length that BASE should return. When min_length is provided, BASE will pad the output with zeros as needed to achieve the length specified.

Examples

The radix argument specifies base and the output from the BASE function is a text string . For example, the formulas below convert the number 13 into text representations of 13 in base 2 (binary), base 10 (decimal), and base 16 (hexadecimal):

=BASE(13,2) // returns "1101"
=BASE(13,10) // returns "13"
=BASE(13,16) // returns "D"

In the worksheet shown, the input numbers are being converted to three different representations: base 2 (binary), base 10 (decimal), and base 16 (hexadecimal). The formulas in D5, E5, and F5 are:

=BASE(B5,2) // base 2
=BASE(B5,10) // base 10
=BASE(B5,16) // base 16

The function also offers an optional argument min_length which will pad the returned string with zeros when its length is less than the given value. For example, the formulas below require a minimum length of 4:

=BASE(3,2,4) // returns "0011" as text
=BASE(10,16,4) // returns "000A" as text

DECIMAL function

The DECIMAL function performs the opposite conversion as the BASE function:

=BASE(100,2) // returns "1100100"
=DECIMAL("1100100",2) // returns 100

See more on the DECIMAL function here .

Notes

  • The result from BASE is a text string.
  • If number is negative, BASE returns a #NUM! error.
  • BASE expects integers; decimal values are ignored.