Wauvel

Excel like a finance pro.

← The library

Math function

BASE

Converts a number to text in another base, such as binary.

Rarely usedDifficulty 1250 · ProficientUsage rank #277 of 520
Practice · 2 questions →

When to use it

Converts a number to text in a given base (2 to 36), with optional zero padding. Binary flags, hex colors, and short IDs.

The shape of it

Syntax
=BASE(number, radix, [min_length])

Worked examples

  • Binary

    =BASE(10,2) 1010

    Ten in binary.

  • Hex

    =BASE(255,16) FF

    Hexadecimal.

  • Padded binary

    =BASE(5,2,8) 00000101

    Padded to eight characters.

Worth knowing

  • DECIMAL reverses it.
  • Base 36 uses digits and letters, handy for compact codes.
  • Unlike DEC2BIN, BASE handles numbers up to 2^53 and any base.

Where it goes wrong

  • Negative numbers return #NUM!.
  • The result is text; compare it with text, not numbers.

Related

Learn the moves here — or let Wauvel run them on your numbers.

Meet your AI CFO →

One CFO-grade Excel tip a week

A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.