# TRIMMEAN Function

> Calculate the mean of a data set without its outliers using TRIMMEAN in TX Sheet Control: the percent to exclude, rounding of the count and #NUM! errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > TRIMMEAN Function
- **218 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/trimmean/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/trimmean/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/trimmean/llms-full.txt

---

Return the mean of a data set without its smallest and largest values. `array` holds the values, and `percent` is the fraction of values to exclude, from 0 to less than 1. The number of excluded values is rounded down to an even number and taken equally from the bottom and the top. A `percent` below 0 or of 1 or more returns `#NUM!`.

### Syntax

```text
TRIMMEAN(array, percent)
```

Category: Statistics. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=TRIMMEAN({1,2,3,4,100},0.4)
```

The formula returns 3: 40% of five values is two, so 1 and 100 are excluded and 2, 3 and 4 are averaged.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [TRIM Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/trim/llms-full.txt)
- **Next:** [TRIMRANGE Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/trimrange/llms-full.txt)
