OCT2DEC function
OCT2DEC converts an octal number to its decimal equivalent. It is seen in IT, networking and low-level data work, and the input is limited to 10 characters.
Example
Read it as a sentence: convert the octal number 17 to decimal, which gives 15.
A
B
C
D
1
15
2
3
Syntax
OCT2DEC(number)
-
number(required) - The octal number to convert, given as text or a number. Up to 10 digits.
Returns: The decimal equivalent.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=OCT2DEC("17") | 15 | Typical |
=OCT2DEC("7777777777") | -1 | Negative (two's complement) |
=OCT2DEC(0) | 0 | Zero |
=OCT2DEC("") | 0 | Empty string |
=OCT2DEC({"1","10"}) | 1 | Spill |
=OCT2DEC(17) | 15 | Number input (not text) |
=OCT2DEC("8") | #NUM! | Invalid digit |
=OCT2DEC("17777777777") | #NUM! | Too long input |
Watch out for
- Input is limited to 10 characters.
- Negative values use two's-complement notation.
Where it works
- Excel
- OCT2DEC is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .