Skip to content
Excel

BASE function in Excel

Converts a number into a text representation with the given radix (base)

=BASE(number, radix, [min_length])

BASE syntax and parameters

Three arguments, two required.

  • numbernumberRequired

    The number that you want to convert. Must be an integer greater than or equal to 0 and less than 2^53.

  • radixnumberRequired

    The base radix that you want to convert the number into. Must be an integer greater than or equal to 2 and less than or equal to 36.

  • min_lengthnumberOptional

    The minimum length of the returned string. Must be an integer greater than or equal to 0.

BASE examples

Formulas you'll actually reuse.

  1. A number as an 8-bit binary string, zero-padded:

    =BASE(B2, 2, 8)

    Result"00101010"

  2. The same number in hexadecimal:

    =BASE(B2, 16)

    Result"2A"

BASE in Google Sheets

Same name — your formula ports as-is.

Try BASE in the playground

Edit the example — nothing to install.

Preloaded with the BASE formula from Example 1 — change anything and watch it respond.

Loading the editor…

BASE errors

What they mean — and the fixes.

  • #NUM!

    The number is negative, or the radix is outside 2–36.