Back to Functions

DECIMAL

The DECIMAL function converts the text representation of a number in another base, to base 10 (decimal).

MathDECIMAL(value, base)

The DECIMAL function in Google Sheets converts the text representation of a number in a specified base (such as binary, octal, or hexadecimal) into its base-10 (decimal) equivalent. It's a handy tool for anyone working with number systems outside of everyday base 10. Dive into our comprehensive guide to master its application.

Parameters

  • value: The text representation of the number to convert, expressed in the given base.
  • base: The base of the number system used to express value, such as 2 for binary or 16 for hexadecimal.

Step-by-Step Tutorial

  1. Converting a binary number to decimal:

    • Example: =DECIMAL("1010", 2)
    • Result: 10
  2. Converting a hexadecimal number to decimal:

    • Example: =DECIMAL("FF", 16)
    • Result: 255

Use Cases and Scenarios

  1. Number System Conversion: Convert values from binary, octal, or hexadecimal into standard decimal form.
  2. Computer Science Education: Demonstrate how different number bases relate to one another.
  3. Data Import Cleanup: Normalize numeric values that were exported in non-decimal formats.

Related Functions

  • BASE: Converts a decimal number into text representation in another base.
  • DEC2BIN: Converts a decimal number to binary.
  • DEC2HEX: Converts a decimal number to hexadecimal.

Related Articles

Newsletter

More DECIMAL examples coming soon.

We are building short, practical updates for Sheets power users.