The Excel BASE Function

Related Function:
Decimal Function

Function Description

The Excel Base function converts a number into a supplied base (radix), and returns a text representation of the calculated value.

Note: the Base function was only introduced in Excel 2013 and so is not available in earlier versions of Excel.

The syntax of the Base function is:

BASE( number, radix, [min_length] )

Where the arguments are as follows:

number - The number that you want to convert (must be an integer ≥ 0 and < 2^53).
radix - The base that you want to convert the supplied number to (must be an integer ≥ 2 and ≤ 36).
[min_length] -

An optional argument that specifies the minimum length of the returned string (if provided, must be an integer ≥ 0 and < 256).

If the converted number is shorter than the value of [min_length], the result is padded out with leading zeros.

If any of the supplied arguments are decimal values, the function truncates them to integers.

Excel Base Function Examples

The spreadsheet below shows three examples of the Excel Base Function.

1 =BASE( 12, 2 )
2 =BASE( 12, 2, 8 )
3 =BASE( 100000, 16 )
1 1100
2 00001100
3 186A0

Note that, in cell A2 of the example spreadsheet, the [min_length] argument has value 8, so the Base function pads out the result with four leading zeros.

For further details and examples of the Excel Base function, see the Microsoft Office website.

Base Function Errors

If you get an error from the Excel Base function, this is likely to be one of the following:

Common Errors
#NUM! -

Occurs if either:

  • The supplied number argument is < 0 or is ≥ 2^53;
  • The supplied radix argument is < 2 or > 36;
  • The [min_length] argument is supplied and is < 0 or ≥ 256.
#VALUE! - Occurs if any of the supplied arguments are non-numeric.