OCT2DEC Function (Calligra Sheets)
Decode octal strings with Calligra OCT2DEC, using explicit base-8 interpretation, reversible text widths and invalid-digit checks.
Verification status: Selected formulas were executed through the Calligra Sheets 25.04.2 calculation engine library. No workbook-import or GUI-cell result is claimed; 26.08.2 was source-checked only. How formula examples are checked
Quick answer: =OCT2DEC("00100") gives 64 in the tested Calligra calculation engine. Successful OCT2DEC results are numeric integers.
Availability and version history
- Introduced: First release not established; the name is present in Calligra 2.4.0 source.
- Supported in: Calligra Sheets 26.08.2, with no retirement established.
- Scope: Desktop Sheets with the Engineering function module. Examples use English semicolon-separated formulas.
- Checked: October 14, 2026. Formulas were executed through the official 25.04.2 engine library, with source and independent arithmetic checks. This is not GUI-cell or workbook-import evidence; 26.08.2 was source-checked, not executed.
What the result represents
OCT2DEC interprets digits 0 through 7 as an octal integer and returns a decimal numeric value. The text 200 means 2×8²=128. A numeric-looking argument is still interpreted by its octal digits: OCT2DEC(20) gives 16, not decimal 20. Function help.
Syntax and arguments
=OCT2DEC(octal)
The function requires one argument. Use quoted text when entering a representation directly, or keep imported octal codes in text cells. Leading zeroes are accepted but are discarded in the numeric result. This decoder has no optional output-width argument because its result is a number. Registration, implementation and versioned help.
Reproducible engine examples
These outputs were obtained through Calligra 25.04.2’s Formula parser and calculation library. The ordinary conversions also match independent positional arithmetic. Backticks preserve literal leading zeroes; they are not part of the entered result.
| Formula | Engine result |
|---|---|
=OCT2DEC("0") |
0 |
=OCT2DEC("7") |
7 |
=OCT2DEC("10") |
8 |
=OCT2DEC("00100") |
64 |
=OCT2DEC("200") |
128 |
=OCT2DEC("777") |
511 |
=OCT2DEC("7777777777") |
1073741823 |
=OCT2DEC(20) |
16 |
Practical worksheet
Enter the octal code 00100 as text in A2. =OCT2DEC(A2) gives 64. Keep both columns when the original code’s width matters. A padded text field and the resulting integer are related values, but they are not interchangeable representations for every file format.
Advanced checks and field widths
The recorded =DEC2OCT(OCT2DEC("00100");5) produces the original five-character text 00100. Without a supplied width, converting 64 back to octal would give the shorter natural representation 100.
The ten-digit string “7777777777” decoded to the positive integer 1073741823. The tested function does not interpret that sequence as a negative value merely because it has ten digits. For signed data, identify the external representation explicitly before deciding how to decode it.
Input boundaries and error cases
The engine accepted “-10” as −8 and surrounding spaces in " 10 " as the value 8. It rejected digit 8, an empty string and a fractional input with #VALUE!. These observations do not extend to OCT2HEX, whose wrapper requires an uninterrupted unsigned octal digit sequence. Clean input according to the intended data format instead of relying on accidental acceptance.
The following engine results show the specific inputs tested. They do not establish every text-format, locale or import rule.
| Formula | Engine result |
|---|---|
=OCT2DEC("8") |
#VALUE! |
=OCT2DEC("-10") |
-8 |
=OCT2DEC(" 10 ") |
8 |
=OCT2DEC(10.5) |
#VALUE! |
=OCT2DEC("") |
#VALUE! |
Range and verification limits
The shared decoder parses an integer using the specified base. A successful decode is not proof that a later encoder or another application can preserve every large value. Keep original digit strings for long identifiers, and distinguish their representation from arithmetic quantities.
The Engineering module and conversion helper are byte-identical in the inspected 25.04.2 and 26.08.2 source files. That supports the source comparison, but does not turn these engine tests into execution of a newer binary or confirmation of its UI/import behavior.