Contact

TRIMMEAN in Calligra Sheets: Trimmed Average, Examples and Limits

Statistical Intermediate Calligra Sheets

Learn Calligra Sheets TRIMMEAN with a repeatable dataset, cutoff fraction examples, outlier analysis, source-level rounding and native-validation limits.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: Documented by 26.08.2; original introduction not established.
  • Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
  • Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.

Quick answer

TRIMMEAN calculates an average after trimming a matching number of low and high observations from a numeric dataset. Its second argument is the combined fraction of observations targeted for removal across both tails. KDE’s XML describes this outlier-reduction purpose and gives the syntax TRIMMEAN(dataSet; cutOffFraction). KDE handbook · pinned XML.

=TRIMMEAN(A2:A9;0.25)

If A2:A9 contains the exact eight values 12, 7, 20, 7, 15, 30, 12 and 4, the independently calculated expected result is 12.1666666667. Sorting gives 4, 7, 7, 12, 12, 15, 20, 30; with a total cutoff fraction of 0.25, one smallest value and one largest value are removed. The six remaining values sum to 73, so 73 ÷ 6 = 12.1666666667. This is mathematical/source-reasoning verification, not a result from a native Calligra run.

Important implementation detail: The inspected Calligra 26.08.2 C++ code calculates its per-tail cut as floor(dataSet.count() × fraction / 2) and then sorts converted numeric values. As a consequence, a cutoff fraction can be nonzero while zero items are actually removed; the cutoff is in whole observations, equally on both sides. Pinned function registration · pinned implementation.

Exact syntax, types, argument order and defaults

=TRIMMEAN(dataSet; cutOffFraction)
Parameter Required? Type/purpose Verified source detail
dataSet Yes, first Numeric observations provided as a range or accepted array; use A2:A9. Official XML labels it dataSet; the C++ function enables array inputs.
cutOffFraction Yes, second A numeric fraction representing the total tail removal fraction, such as 0.25 or a numeric cell holding 25%. Implementation checks 0 ≤ fraction < 1.
Return — A floating-point trimmed average for the retained numeric observations. Calculation sorts numeric conversions, removes the extremes and divides by retained count.

Both parameters are required. There is no optional default or third argument selecting lower-only/upper-only trimming. The C++ registration calls setParamCount(2) and setAcceptArray(). KDE’s English formula instructions use semicolon argument separators, an initial equals sign, and decimal periods in displayed examples. Other locales may represent the decimal fraction or separator differently; locale behavior has not been tested.

Do not enter 25 when you mean 25%. The argument value for a 25-percent cutoff is 0.25 (or a properly numeric 25%-formatted cell), not 25. The source rejects fractions outside [0,1), but its exact application-visible error text is unknown without native testing.

Build the worksheet step by step

  1. Open a blank Calligra Sheets document and enter Observation into A1, +10 into B1, and ×2 into C1.
  2. Enter these eight numeric values in A2:A9 as displayed below. In B2 type =A2+10; in C2 type =2*A2; fill each formula down through row 9.
  3. In D1 type Cutoff fraction, in D2 type the numeric value 0.25, and in E1 type Trimmed mean.
  4. In E2 enter =TRIMMEAN($A$2:$A$9;D2). With $A$2:$A$9, the range stays fixed if the formula is copied; see KDE’s relative/absolute reference guide.
  5. Compare to the independent expected result 12.1666666667. A displayed result may be rounded by cell formatting; increasing shown decimals is not the same as changing the underlying arithmetic.
Row A: observation B: observation + 10 C: observation × 2
2 12 22 24
3 7 17 14
4 20 30 40
5 7 17 14
6 15 25 30
7 30 40 60
8 12 22 24
9 4 14 8

The original untrimmed sum is 107 and its ordinary average is 13.375. The lower and upper extremes are 4 and 30. Removing those two values leaves 7, 7, 12, 12, 15, 20, with a total of 73 and a trimmed mean of about 12.16666667. Trimmed mean implementation.

Twelve checked formulas and expected outputs

All expectations below were computed independently for the exact numeric worksheet. They are not application runtime measurements. The number in the third column is the count removed from each tail for the given fraction, assuming the eight numeric source values.

# Formula Removed per tail Independently expected value Explanation
1 =TRIMMEAN(A2:A9;0) 0 13.375 No trimming.
2 =TRIMMEAN(A2:A9;0.1) 0 13.375 floor(8×0.1/2)=0.
3 =TRIMMEAN(A2:A9;0.2) 0 13.375 The fraction is too small to remove a full pair.
4 =TRIMMEAN(A2:A9;0.25) 1 12.1666666667 Remove 4 and 30.
5 =TRIMMEAN(A2:A9;0.3) 1 12.1666666667 Fraction changes but cut count stays one per tail.
6 =TRIMMEAN(A2:A9;0.5) 2 11.5 Keep 7, 12, 12 and 15.
7 =TRIMMEAN(A2:A9;0.75) 3 12 Keep the middle 12 and 12.
8 =TRIMMEAN(A2:A9;0.99) 3 12 Fractions below one still keep two middle observations here.
9 =TRIMMEAN(B2:B9;0.25) 1 22.1666666667 Adding 10 to every value adds 10 to the trimmed mean.
10 =TRIMMEAN(C2:C9;0.25) 1 24.3333333333 Doubling every value doubles the trimmed mean.
11 =TRIMMEAN(A2:A5;0.5) 1 9.5 Sorted 7, 7, 12, 20 → mean of 7 and 12.
12 =TRIMMEAN($A$2:$A$9;D2) 1 12.1666666667 Uses cutoff 0.25 stored in D2.

For the 8-value examples, floor(n × fraction / 2) gives the whole number of items to remove from each side. Duplicates count as separate observations, and the fraction is not rounded up to force removal. KDE’s actual C++ algorithm sorts its numeric list and uses this cutoff for the loop; these are source observations and independent calculations, not a native test report.

Advanced use: compare outlier sensitivity

Consider a separate fully numeric range G2:G9 containing 6, 7, 7, 8, 8, 9, 10, 100, one value per cell. The usual average is 19.375, because the sum is 155. With a fraction of 0.25, TRIMMEAN removes 6 and 100, and the six retained values sum to 49; their average is 8.1666666667.

Formula on G2:G9 Independently expected value Meaning
=AVERAGE(G2:G9) 19.375 Every value receives equal weight, including 100.
=TRIMMEAN(G2:G9;0.25) 8.1666666667 One lowest and one highest observation omitted.
=TRIMMEAN(G2:G9;0) 19.375 No observations removed.

AVERAGE provides the untrimmed comparison. Trimming is appropriate only where discarding extremes is part of your analytical method. In small samples it may discard legitimate measurements, and it does not diagnose the reasons an outlier occurred. KDE XML function purpose.

For repeatable analysis, keep the original numbers, record the fraction in a dedicated cell, label the rule for how many observations were removed, and compare trimmed and untrimmed means. Do not quietly replace raw data with trimmed results.

Source-level nuances and validation caveats

Count of values vs shape of a range. The pinned implementation obtains its cut number from dataSet.count() before independently converting the input range into a sorted numeric list. The underlying Value::count implementation counts stored nonempty array elements, whereas the statistical array helper iterates array cells and converts entries. Consequently, the exact trimming behavior with blank, string, logical or error-valued cells is not established by the all-numeric examples. The code does not contain a visible “ignore all nonnumeric cells” filter here. Native tests are required.

Invalid fractions. Values below zero or greater than/equal to one reach an explicit internal errorVALUE() branch in the function implementation. This is a code-level control-flow observation; it does not prove an exact UI error label or how localized messages are displayed. Avoid trying to extrapolate Excel or Google Sheets error outputs to Calligra.

Empty data. The implementation returns an internal value error if the derived numeric-list count is zero, but there can also be range conversion/aggregation behavior outside the function body. The guide makes no promise about the user-visible error for a completely blank selected range.

Rounding and overflow. The trimmed mean should be compared within the precision shown by the spreadsheet. Source calculations use floating-point accumulators, so retaining excessive digits or combining extremely large values may reveal floating-point precision limitations; no stress tests were performed.

Troubleshooting table

Problem Evidence-based guidance
Output looks identical to AVERAGE For small datasets or low fractions, floor(n×fraction/2) can be 0. Verify how many whole observations are removed.
Wrong tail count Fraction is total trimmed proportion, not the proportion from each end. Enter 0.25 for 25%.
Results differ from a hand calculation Sort values, count nonempty numeric observations, remove the same number from each end, then average the retained numbers. Ensure the originally entered cells are numeric.
Mixed blank/text values Source conversion and counting have different mechanisms. Use a clean numeric range and flag this as native-test work, not a known skip rule.
Unexpected error with fraction <0 or ≥1 The function body explicitly returns an internal value error. Check the fraction cell for a percent-vs-whole-number mistake.
Wrong data after filling down Freeze source ranges with $A$2:$A$9 or confirm you intended a moving window. KDE documents absolute references.
Function not available in the menu Check installed component, version and Function dialog; a source registration is not proof of availability in every packaged edition.

KDE’s formula-entry help describes entering functions, using semicolons, accessing the Function dialog and anchoring references.

Platform, version and compatibility

The exact review target is Calligra Sheets’ 26.08.2 source revision 72123cc643f6625351139e7df294544255a1056f, associated with KDE Gear’s October 8, 2026 release. The function is documented in the English KF6 handbook and registered in the pinned statistical module, so the intended syntax and algorithm can be investigated. Official announcement · pinned source registration · XML. KDE’s Calligra download page describes Linux distribution packages/Flatpak and ongoing Windows work; this review cannot certify formula availability across platforms, editions or downstream builds.

Compatibility is evidence-based, not assumed: the mathematical idea of a trimmed mean exists in other spreadsheets and statistical packages, but another product’s handling of text, blank cells, percentage rounding, error values, or optional parameters is not evidence for Calligra. No Excel/Sheets/LibreOffice compatibility test, import/export test or native application run was completed. For native validation, test numeric-only baseline; threshold fractions; errors; mixed input types; an empty range; locale separators; differing installed release packages; and visible UI error messages.

Native limitations: Application evaluation and localization checks have not been performed. No screenshots or native tests are claimed.