Quick Navigation
BASE Function
Summary
The BASE function converts a decimal number into its representation in a specified base (radix), returning the result as text. It supports bases from 2 to 36 and can pad the output with leading zeros to meet a minimum length requirement.
Syntax
BASE(number, radix, [min_length])
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| number | Number |
Yes | The integer to convert (≥0 and <2^53). Non-integers are truncated. |
| radix | Number |
Yes | Target base (integer 2-36). |
| min_length | Number |
No | Minimum output length (0-255). Pads with leading zeros if needed. |
Using the BASE Function
Use BASE to convert decimal numbers to alternative number systems like binary for bit analysis, hexadecimal for memory addresses, or custom bases for specialized encoding needs.
Common BASE Examples
Convert 7 to Binary
=BASE(7,2)
Converts decimal 7 to binary representation.
Convert 100 to Hexadecimal
=BASE(100,16)
Returns hexadecimal '64' for decimal 100.
Binary with Leading Zeros
=BASE(15,2,10)
Pads binary 1111 to 10 characters: '0000001111'.
Frequently Asked Questions
Common Errors and Solutions
#NUM!
Cause: Number <0 or ≥2^53, radix <2 or >36, min_length >255 or <0
Solution: Verify input ranges meet constraints.
#VALUE!
Cause: Non-numeric input for any argument
Solution: Ensure all arguments are numbers.
Notes
- Non-integer numbers are truncated to integers.
- Result is always returned as text.
- Digits 10-35 use A-Z (uppercase in output).
- Available in Excel 2007 and later versions.
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365
Not available in:
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+