DECIMAL Function
Convert a number in a stated base into a decimal value
Convert a number in a stated base into a decimal value
The DECIMAL function in Excel is a Math and Trigonometry function. It is used for converting a text representation of a number in a stated base into a decimal value. The function was introduced in MS Excel 2013.
=DECIMAL (text, radix)
Where:
If radix is greater than 10, it will use 0-9 numeric values and A-Z letters as required. For example, if we use base 16, it will use 0-9 and A-F. For base 30, it will use 0-9 and A-T.
To understand how to use this function, let’s consider a few examples:
Let’s assume we wish to convert the three random letters “C”, “F”, and “A” in base 36 to its equivalent decimal value. The formula to be used would be:
This Decimal function used the formula =(12*(36^2))+(15*(36^1))+(10*(36^0)) as “C” is in position 12, “F” in position 15 and “A” in position 10. The result would be:
Let’s take this example wherein we wish to convert the binary (base 2) value 1111 to its equivalent decimal.
The DECIMAL Function will convert 1111 to its equivalent decimal (base10) value of 15.
Here the formula used is =(1*(2^3)) +(1*(2^2)) +(1*(2^1)) +(1*(2^0)). We can cross check this result with BIN2DEC function. The formula to be used would be BIN2DEC (“1111”).
Let’s assume we wish to convert the hexadecimal (base 16) value FFF to its equivalent decimal (base 10) value (255). The formula that we can use would be:
The DECIMAL Function used the formula =((15*(16^2)+(15*(16^1))+(15*(16^0)).
Here, F is in position 15 in the base 16 number system. As all number systems start with 0, the 16^{th} character in hexadecimal will be in the 15^{th} position. We would get the result 4095.
Now, let’s say we wish to convert “I wish to travel” into a decimal.
The result would be:
Now, let’s see a few more examples to understand how the DECIMAL function works:
Click here to download the sample Excel file
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional resources:
To master the art of Excel, check out CFI’s FREE Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Launch CFI’s Free Excel Course now to take your career to the next level and move up the ladder!