Excel functions / Math

BASE function

Writes a number in another base, such as binary (2) or hexadecimal (16), as text.

Syntax

=BASE(number, radix, [min_length])

Arguments

When to use it

BASE writes a whole number in any base from 2 to 36, as text. It covers what DEC2BIN and DEC2HEX do and more, without their size limits.

Examples

  1. A number in base 36, as short codes use

    ABC
    1Number
    21234562N9C

    In C2: =BASE(A2, 36) → 2N9C

    Try this example

  2. Binary, padded to eight digits

    ABC
    1Number
    2500000101

    In C2: =BASE(A2, 2, 8) → 00000101

    Try this example

Common mistakes

BASE in other languages

Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.

Translate a whole formula

Try BASE in the playground

Related functions