Syntax
| Parameter | Description |
|---|---|
| number | Parameter of the BASE function. |
| radix | Parameter of the BASE function. |
| [min_length] | (Optional.) Parameter of the BASE function. |
Examples
Decimal to hexadecimal
=BASE(255, 16)
Decimal to binary with padding
=BASE(10, 2, 8)
Decimal to octal
=BASE(255, 8)
Common Errors
Occurs when the number is negative, the radix is outside 2-36, or the minimum length is negative.
Occurs when arguments are non-numeric text.
Tips
BASE supports any base from 2 (binary) to 36 (using 0-9 and A-Z). Base 16 (hex) and base 2 (binary) are the most common uses.
The third argument sets minimum output length. =BASE(5, 2, 8) returns "00000101" instead of "101" — essential for consistent formatting.
BASE returns a text string, not a number. To convert back, use DECIMAL: =DECIMAL("FF", 16) returns 255.
Try BASE in Viztab
Import your data and use BASE with 370+ other formulas. No signup required.
Open Viztab