Math & Trig

BASE Function in Excel

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

Syntax

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

Arguments

  • number (required): Number to convert
  • radix (required): Base (2-36)
  • min_length (optional): Minimum length of result

Examples

  • =BASE(255, 16) - Convert to hexadecimal - Result: FF
  • =BASE(10, 2, 8) - Convert to binary with padding - Result: 00001010

BASE in reporting workflows

  • Use absolute references when copying formulas across rows.
  • For conditional totals see [SUMIF](/functions/sumif/) and [SUMIFS](/functions/sumifs/).
  • Filtered lists may need [SUBTOTAL](/functions/subtotal/) instead of SUM on visible cells only.

Common errors

  • #NUM! if radix not 2-36

Use cases

  • Number systems
  • Programming
  • Data encoding

Frequently asked questions

  • What is BASE in Excel and how does it work? BASE converts a number into a text representation with the given radix (base). The syntax is =BASE(number, radix, [min_length]). For example, =BASE(255, 16) returns "FF" (hexadecimal). The radix can be any number from 2 to 36.
  • What number bases can BASE handle? BASE supports radix values from 2 (binary) to 36. Common bases include: 2 (binary), 8 (octal), 10 (decimal), 16 (hexadecimal). Bases above 10 use letters A-Z to represent digits 10-35. For example, base 36 uses 0-9 and A-Z.
  • What is the min_length parameter in BASE? The optional min_length parameter pads the result with leading zeros to reach the specified minimum length. For example, =BASE(10, 2, 8) returns "00001010" instead of "1010". This is useful for formatting binary or hexadecimal values to a fixed width.
  • How do I convert back from BASE to decimal? Use the DECIMAL function to convert back. For example, if =BASE(255, 16) returns "FF", then =DECIMAL("FF", 16) returns 255. DECIMAL is the inverse of BASE for the same radix.
  • Why does BASE return #NUM! error? BASE returns #NUM! when the radix is less than 2 or greater than 36, or when the number is negative. BASE only works with non-negative integers and radix values between 2 and 36. Ensure your radix is in the valid range and your number is non-negative.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.