Engineering functions

OCT2DEC

Matches all 1,001 recorded answers

Recorded: 998 in the answer bank and 3 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicOCT2DEC
BulgarianOCT2DEC
CzechOCT2DEC
DanishOKT.TIL.DEC
GermanOCT2DEC
GreekOCT2DEC
English (Australia)OCT2DEC
English (United Kingdom)OCT2DEC
English (United States)OCT2DEC
SpanishOCT.A.DEC
EstonianOCT2DEC
FinnishOKTDES
FrenchOCTDEC
HebrewOCT2DEC
CroatianOCT2DEC
HungarianOKT.DEC
IndonesianOCT2DEC
ItalianOCT2DEC
JapaneseOCT2DEC
KoreanOCT2DEC
LithuanianOCT2DEC
LatvianOCT2DEC
NorwegianOCT2DEC
DutchOCT2DEC
PolishÓSM.NA.DZIES
Portuguese (Brazil)OCT2DEC
Portuguese (Portugal)OCTADEC
RomanianOCT2DEC
RussianВОСЬМ.В.ДЕС
SlovakOCT2DEC
SlovenianOCT2DEC
Serbian (Latin)OCT2DEC
SwedishOKT.TILL.DEC
ThaiOCT2DEC
TurkishOCT2DEC işlevi
UkrainianOCT2DEC
VietnameseOCT2DEC
Chinese (Simplified)OCT2DEC
Chinese (Hong Kong)OCT2DEC
Chinese (Traditional)OCT2DEC

Names from Microsoft's support site.

What it does

OCT2DEC(number)

OCT2DEC(number) converts octal to decimal. The result is a numeric worksheet value.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=OCT2DEC("55") returns 45. All of these represent the same integer: decimal 45, binary 101101, octal 55, and hexadecimal 2D.

For a negative value, =OCT2DEC("7777777723") returns -45. Accumulation gives 1073741779; the full-width sign bit is set, so subtract 2^30 to get -45. A shorter octal source cannot set that 30-bit sign bit.

Quirks

These engineering conversions use signed fixed-width encodings, not arbitrary-length integers. The source accepts at most ten digits; a full ten-digit encoding uses 30-bit two’s complement. 7777777777 represents minus one. Invalid source digits or an oversized input give #NUM!. Quote source digits to keep leading zeros and prevent worksheet number parsing from changing the input.

How to implement

Separate input parsing, signed interpretation and output formatting. Uppercase the source, validate its digit set and length, and accumulate raw=raw*8+digit with checked integer arithmetic. Only a full ten-digit source with its top bit set is negative: subtract 2^30 to obtain signed integer v. Return v as a number. The 45 example is an exact integer at every step. Do not infer sign merely from the first source character of a short encoding.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

OCT2DEC · 1 lines · calc-func/src/catalogue/engineering.rs on GitHub
11 oct2dec "OCT2DEC" (1, 1) [V "number"] |s, a, sv| { to_decimal(s, a, radix::oct2dec_kernel) }
oct2dec_kernel · 3 lines · calc-func/src/ported/engineering_radix_family.rs on GitHub
pub fn oct2dec_kernel(number: &str) -> Result<f64, WorksheetErrorCode> {
    source_to_decimal_kernel(number, OCT_SPEC)
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded998

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

998 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

DEC2OCT converts in the reverse direction. BASE and DECIMAL provide general radix conversion with different sign rules. A full-width negative engineering encoding is not a minus-prefixed numeral; choose the pair whose sign convention fits your input.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents