BASE

Converts a number into a text representation in another base, for example, base 2 for binary. Learn more.

Video field
Math

In Google Sheets, BASE is a function that converts a decimal number to a number of a specified base. The function takes two or three arguments:

value: This is the decimal number that you want to convert to a number of the specified base. base: This is the base that you want to use for the conversion. The base can be any integer between 2 and 36, inclusive. [min_length]: This is an optional argument that specifies the minimum length of the resulting number.

If the converted number is shorter than the specified minimum length, the function pads the number with zeros to the left to make it the desired length.

The BASE function can be useful in various scenarios, such as when you want to convert decimal numbers to binary, octal, or hexadecimal numbers for programming or when you want to convert decimal numbers to other number systems used in mathematics or engineering.

For example, if you want to convert the decimal number 123 to a binary number with a minimum length of 8 digits, you can use the BASE function like this:

=BASE(123, 2, 8)

The resulting binary number would be "01111011".

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!