Google Sheets
BASE function in Google Sheets
Converts a number into a text representation in another base, for example, base 2 for binary. .
=BASE(value, base, [min_length])BASE syntax and parameters
Three arguments, two required.
- valuenumberRequired
- basenumberRequired
- min_lengthnumberOptional
BASE examples
Formulas you'll actually reuse.
A number as an 8-bit binary string, zero-padded:
=BASE(B2, 2, 8)Result
"00101010"The same number in hexadecimal:
=BASE(B2, 16)Result
"2A"
BASE in Excel
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.
Related functions
More ways Google Sheets gets this done.
- ABSReturns the absolute value of a number.MathExcel
- ACOSReturns the inverse cosine of a value, in radians.MathExcel
- ACOSHReturns the inverse hyperbolic cosine of a number.MathExcel
- ACOTReturns the inverse cotangent of a value, in radians. .MathExcel
- ACOTHReturns the inverse hyperbolic cotangent of a value, in radians. Must not be between -1 and 1, inclusive..MathExcel
- ASINReturns the inverse sine of a value, in radians.MathExcel