Contact

TRIMMEAN Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Use Apache OpenOffice TRIMMEAN with total trimming fractions, even-count rounding and worked outlier examples that distinguish trimming from winsorization.

Verification status: Eight reference formulas and 3 boundary cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using XLSX import and GUI hard recalculation. Other explanatory calculations are independent references. How formula examples are checked

Quick answer: =TRIMMEAN(B4:B13;0.1) has reference value 14.5.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
  • Scope: Desktop Calc, English function names and semicolon-separated formulas. Locale and file-format mappings may differ.
  • Checked: October 14, 2026. Eight reference formulas and the listed boundary cases were recalculated in 4.1.16 on Linux x86-64, Build 9816, using XLSX import. Source and independent mathematics were also checked.

What TRIMMEAN returns

TRIMMEAN sorts the numeric observations, discards the same number from each end, and averages what remains. Fraction specifies the total portion to remove across both tails, not the portion to remove from each tail. Release implementation.

Syntax and arguments

=TRIMMEAN(Data; Fraction)

Exactly two arguments are required: the data and a trimming fraction satisfying 0≤Fraction<1. If n is the number of collected observations, the source floors n×Fraction, reduces an odd removal count by one, and removes half from each end. Equivalently, each end loses floor(n×Fraction/2) observations.

Reproducible examples

These eight formulas were recalculated in the stated 4.1.16 build using XLSX import. Saved numeric results agree with independent high-precision calculations; values below are rounded to twelve decimal places. The comparison concerns stored values, not a claim that every display format prints the same digits.

For the range formulas, enter these values in the indicated columns and rows. Keep labels outside the calculation ranges.

Row A B D
4 1 1 1
5 2 2 1
6 3 3 1
7 4 4 1
8 5 5 2
9 6 6 2
10 7 7 3
11 8 8 4
12 9 9 5
13 10 100 10
Formula Reference / native agreement
=TRIMMEAN(B4:B13;0) 14.5
=TRIMMEAN(B4:B13;0.1) 14.5
=TRIMMEAN(B4:B13;0.2) 5.5
=TRIMMEAN(B4:B13;0.3) 5.5
=TRIMMEAN(B4:B13;0.4) 5.5
=TRIMMEAN(B4:B13;0.8) 5.5
=TRIMMEAN(A4:A13;0.2) 5.5
=TRIMMEAN(D4:D13;0.4) 2.166666666667

Practical worksheet

Column B contains 1 through 9 followed by 100. With no trimming, the mean is 14.5. =TRIMMEAN(B4:B13;0.2) removes one observation from each end, leaving 2 through 9 and giving 5.5.

A fraction of 0.1 removes nothing because n×Fraction=1 is reduced to the next lower even count, zero. A fraction of 0.3 removes two observations in total, just as 0.2 does for these ten data points. The requested fraction and the realized trimmed proportion need not be equal in a finite sample.

Advanced interpretation and checks

At fraction 0.4, two observations are removed from each end of the ten-value sample. The remaining 3 through 8 still average 5.5. At fraction 0.8, only 5 and 6 remain, again averaging 5.5. These repeated values follow this particular dataset, not a rule that the choice of fraction never matters.

The D column gives a different example: its sorted values are 1,1,1,1,2,2,3,4,5,10. Trimming 0.4 leaves 1,1,2,2,3,4, whose mean is 13/6, approximately 2.166666666667.

Trimming removes observations; winsorization replaces extremes with boundary values and retains the original count. Those procedures are not interchangeable. A trimmed mean also does not provide a confidence interval or standard error by itself.

Boundaries and troubleshooting

Fraction 1 is rejected; the function does not permit removing every observation. Negative fractions are also invalid. An empty numeric collection cannot yield a mean and is kept as an error in the diagnostics.

Trimming may reduce sensitivity to a small number of extreme values, but deciding a fraction after seeing the answer can bias an analysis. Choose and document a defensible rule. Referenced data collection and sorting can omit nonnumeric cells; audit the effective count before interpreting the realized trimming.

The following boundary formulas were recalculated in the same named method. H5 and H6 are deliberately empty cells where referenced. An error display remains an error even if the underlying ODS numeric attribute stores zero.

Formula Native result or error
=TRIMMEAN(B4:B13;1) Err:502
=TRIMMEAN(B4:B13;-0.1) Err:502
=TRIMMEAN(H5:H6;0.2) #VALUE!

Official evidence and checking scope

The retained input and saved ODS preserve the tested formula identities. A stale SUM cache changed from 999999 to 3, and an uncached SUM returned 7 after hard recalculation. Native evidence is limited to the eight reference formulas and listed boundary cases in this exact release and method. Composite explanatory examples are independent calculations unless listed among those cases; other releases, locales and extreme-parameter accuracy were not established.