The BASE function in Excel allows you to convert a decimal number into another number base such as
binary, octal, or hexadecimal. This function is especially useful for programmers, engineers, students, and anyone
working with different number systems.
What Is the BASE Function?
BASE converts a base-10 number into a text representation of another base ranging from
2 to 36. The result is returned as text, not a numeric value.
BASE Function Syntax
=BASE(number, radix, [min_length])
Arguments
- number – The decimal number you want to convert.
- radix – The base to convert the number to (2–36).
- min_length – (Optional) Pads the result with leading zeros to reach a specified length.
Examples of the BASE Function
Convert Decimal to Binary
=BASE(10, 2)
Result: 1010
Convert Decimal to Hexadecimal
=BASE(255, 16)
Result: FF
Convert Decimal to Octal
=BASE(64, 8)
Result: 100
Using the min_length Argument
The optional min_length argument ensures a fixed-width result by adding leading zeros.
=BASE(10, 2, 8)
Result: 00001010
This is commonly used when working with binary values in programming and electronics.
Download the BASE Function Excel Template
⬇ Download BASE_Excel_Template.xlsx
This Excel template demonstrates how to use the BASE function to convert decimal numbers into
binary, octal, hexadecimal, and other number systems. It also includes an example using the
min_length argument.
Supported Bases in Excel
| Base | Description |
|---|---|
| 2 | Binary |
| 8 | Octal |
| 10 | Decimal |
| 16 | Hexadecimal |
| 36 | Alphanumeric (0–9, A–Z) |
BASE vs DECIMAL
The DECIMAL function performs the reverse operation of BASE.
| Function | Purpose |
|---|---|
| BASE | Decimal → Another base |
| DECIMAL | Another base → Decimal |
Example:
=DECIMAL("FF", 16)
Result: 255
Common Use Cases
- Binary and hexadecimal calculations
- Programming and computer science education
- Network addressing
- Engineering and electronics
- Data encoding and decoding
Important Notes
- The BASE function always returns text.
- The radix must be between 2 and 36.
- Negative numbers are not supported.
- Alphabetic characters are returned in uppercase.
Final Thoughts
The BASE function expands Excel’s capabilities beyond traditional math, allowing you to work with
multiple number systems easily. Combined with the DECIMAL function, it provides a complete solution
for converting between numeric bases.