Google Sheets TRIMMEAN Function: A How-To Guide
In this article
The TRIMMEAN function in Google Sheets calculates the mean of a dataset after excluding a specified percentage of the most extreme values from both the top and bottom of the range. This is useful when you want an average that is less affected by outliers, such as a few unusually high or low numbers that could skew a simple AVERAGE. To use it, you need a dataset in your sheet and a clear idea of what percentage of values to trim.
What You'll Need
- A Google account with access to Google Sheets.
- A dataset with numeric values in a column or row.
- Knowledge of the percentage of values you want to exclude (e.g., 10% for a 10% trim).
Step-by-Step
- Open your Google Sheets spreadsheet and locate the range of numbers you want to analyze. For example, suppose your data is in cells A1 through A20.
- Click on an empty cell where you want the result to appear.
- Type the TRIMMEAN formula:
=TRIMMEAN(range, percent). Replacerangewith your actual data range (e.g.,A1:A20) andpercentwith the decimal or percentage of values to exclude. For a 10% trim, you can enter0.1or10%. - Press Enter. The cell will display the trimmed mean.
- To apply the formula to other ranges, copy the cell and paste it where needed, adjusting the range and percent as required.
Note: The percent argument must be between 0 and 1 (inclusive). If you enter a percentage like 10%, Google Sheets treats it as 0.1. The number of values excluded is rounded down to the nearest even number to ensure symmetry.
Common Mistakes
- Using a percent greater than 1 (e.g., 10 instead of 0.1) – this will cause an error because the percent must be between 0 and 1.
- Including non-numeric values in the range – TRIMMEAN ignores text and logical values, but it's best to ensure the range contains only numbers.
- Forgetting that the number of excluded values is rounded down to the nearest even number – for example, with 20 values and 10% trim, 2 values are excluded (1 from each end), not 2 from each end.
- Assuming TRIMMEAN works like AVERAGE with a simple exclusion – it symmetrically removes values from both ends, not just the highest or lowest.
Tips
- Use TRIMMEAN when your data has outliers that could distort the average. It gives a more robust central tendency.
- You can reference the percent from another cell (e.g.,
=TRIMMEAN(A1:A20, B1)) to make it dynamic. - If you want to exclude a specific number of values from each end, consider using
AVERAGEwithLARGEandSMALLfunctions instead, as TRIMMEAN uses a percentage. - Test with a small dataset to see how many values are actually excluded – you can use
COUNTand manual calculation to verify.
Troubleshooting
- #NUM! error: The percent is less than 0 or greater than 1. Check your percent value.
- #VALUE! error: The range contains non-numeric values that cannot be interpreted. Ensure the range is numeric.
- Unexpected result: Verify the number of values excluded. For example, with 10 values and 20% trim, 2 values are excluded (1 from each end). If you expected 2 from each end, adjust the percent accordingly.
- Formula not calculating: Check that the cell is not formatted as text. Re-enter the formula or change the format to automatic.
Frequently Asked Questions
What does TRIMMEAN do?
TRIMMEAN calculates the mean of a dataset after removing a specified percentage of values from both the top and bottom of the range.
How is the number of excluded values determined?
The total number of values to exclude is the percent multiplied by the count of values, rounded down to the nearest even number. Half of that number is removed from each end.
Can I use TRIMMEAN with text or logical values?
No, TRIMMEAN ignores text and logical values, but it's best to use a range with only numbers to avoid confusion.
What happens if the percent is 0?
If percent is 0, TRIMMEAN returns the same result as AVERAGE because no values are excluded.
Is TRIMMEAN available in Excel?
Yes, TRIMMEAN is also available in Microsoft Excel with similar syntax and behavior.
Can I use a cell reference for the percent?
Yes, you can reference a cell containing the percent value, such as =TRIMMEAN(A1:A20, B1).