Contact

DECIMAL Function (Calligra Sheets)

Engineering Intermediate Calligra Sheets

Decode digit strings in bases 2–36 with Calligra DECIMAL, including hexadecimal prefixes, binary suffixes, whitespace and numeric results.

Verification status: Selected formulas were executed through the Calligra Sheets 25.04.2 calculation engine library. Version 26.08.2 was source-checked only. How formula examples are checked

Quick answer: =DECIMAL("1CD";16) gives 461 in the tested Calligra calculation engine. The result is numeric.

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 module. Examples use English semicolon-separated formulas.
  • Checked: October 14, 2026. Formulas were executed through the official 25.04.2 engine library and checked against source and independent mathematics. This is not GUI-cell or workbook-import evidence; 26.08.2 was source-checked, not executed.

What DECIMAL returns

DECIMAL interprets a digit string in the radix you supply and returns an integer. It does not insert a decimal point or round a decimal fraction. For example, hexadecimal 1CD represents 1×16²+12×16+13=461. The result is an ordinary numeric value; it no longer retains the input’s leading zeroes or letter case. Registered implementation.

Syntax and arguments

=DECIMAL(text;radix)

Both arguments are required. Text is the digit representation and radix is its base. Choose an integer radix from 2 through 36 for the conversions described here. This function is registered in the inspected source even though it is absent from the retained Engineering help list; the implementation is the direct reference for its behavior. Registration and implementation.

Reproducible engine examples

Backticks preserve literal leading zeroes in text results. Numeric decoder results do not preserve an input field’s padding.

Formula Engine result
=DECIMAL("1010";2) 10
=DECIMAL("FF";16) 255
=DECIMAL("1CD";16) 461
=DECIMAL("715";8) 461
=DECIMAL("Z";36) 35
=DECIMAL("10";36) 36
=DECIMAL("0000";10) 0
=DECIMAL("255";16) 597

Practical worksheet

Suppose A2 holds the text 1CD and B2 holds 16. =DECIMAL(A2;B2) returns 461. A neighboring row could hold 715 and base 8, also giving 461. Keeping an explicit base column prevents numeric-looking identifiers such as 255 from being mistaken for decimal input: DECIMAL("255";16) returns 597.

Advanced interpretation and checks

The recorded =BASE(DECIMAL("1CD";16);16;4) returns text 01CD. The outer conversion restores a chosen four-character width; that width cannot be inferred from the decoded integer. Use this kind of round trip to check a small, validated code while retaining the original text separately.

For binary 1010, the independent check is 1×8+0×4+1×2+0×1=10. For base 36, Z represents 35, and 10 represents 36. A digit is meaningful only in conjunction with the radix.

Input boundaries and cautions

This wrapper removes ASCII spaces and tabs throughout the input. It also strips a leading 0x or trailing h for hexadecimal and a trailing b for binary, case-insensitively. Thus “1 0” in base 2 becomes 2 instead of being rejected. A leading minus sign was accepted; an invalid digit and empty string returned #VALUE!.

Those conveniences are not a data-validation policy. A malformed identifier with embedded spaces may silently become a different accepted value. Validate the source format before calling DECIMAL. The fractional radix 2.9 was converted to 2; deliberately supply an integer rather than relying on that conversion.

Formula Engine result
=DECIMAL("0xFF";16) 255
=DECIMAL("FFh";16) 255
=DECIMAL("101b";2) 5
=DECIMAL("1 0";2) 2
=DECIMAL("-FF";16) -255
=DECIMAL("2";2) #VALUE!
=DECIMAL("";16) #VALUE!
=DECIMAL("10";2.9) 2

Numeric range and data handling

The shared decoder uses an integer text parser. An accepted string is not proof that every subsequent calculation, export or encoder preserves the same range. These examples use small exact integers; unsupported radices and integer-overflow limits were not tested. The Engineering module and conversion helper are byte-identical in the inspected 25.04.2 and 26.08.2 sources.