Trimmed Mean Calculator

Trimmed Mean Calculator

Work out a trimmed mean that resists outliers: trim a percentage or a count from each end, or copy Excel's TRIMMEAN rule, and compare the result with the plain mean and the median.

Numbers separated by commas, spaces or line breaks. At least 2 values.
10% per side removes 20% of the data in total — 1 value from each end of 10.
TRIMMED MEAN · 10% PER SIDE
17.625

Plain mean
25.3
Median
17.5
Values removed
2
Values kept
8
n
10
Trimmed values
12, 100

CALCULATION

    MEAN · MEDIAN · TRIMMED MEAN

    A trimmed mean is a mean with the extremes taken off first. Sort the data, drop the same amount from each end, and average what is left. One wild value — a typo, a sensor glitch, a single huge order — can drag the plain mean a long way, but it cannot touch the trimmed mean, because it is trimmed away before the averaging starts. Paste your data below and the calculator shows the trimmed mean next to the plain mean and the median, with the values it removed listed.

    How to use the trimmed mean calculator

    1. Paste your numbers into the data box, separated by commas, spaces or line breaks.
    2. Choose how to trim: a percentage per side, a count per side, or Excel's TRIMMEAN rule.
    3. Set the trim — 10% per side is a common choice.
    4. Read the trimmed mean at the top, then the plain mean, the median and the values removed.
    5. Switch to Excel TRIMMEAN mode to see what Excel would return for the same data and trim.

    Try it now: the worked example below uses 12, 15, 14, 18, 16, 20, 22, 19, 17 and 100. The plain mean is 25.3 and the median is 17.5. Trim 10% per side and the trimmed mean is 17.625 — the 100 is gone, and the answer is back near the middle of the data.

    What is a trimmed mean?

    Sort the data, remove k values from each end, and take the mean of what is left. That is the whole method. With n values and k trimmed from each side, the trimmed mean is the sum of the middle n − 2k values divided by n − 2k.

    For the worked example the sorted data are 12, 14, 15, 16, 17, 18, 19, 20, 22 and 100. Trim 10% per side, which is k = 1 on 10 values, so 12 and 100 are removed and the mean of the 8 kept values — 14, 15, 16, 17, 18, 19, 20 and 22 — is 141 / 8 = 17.625. The plain mean of all 10 values is 253 / 10 = 25.3, so the single value 100 lifts the mean 7.8 above the median of 17.5, while the trimmed mean sits only 0.125 above it.

    The trimmed mean is one of the standard ways to summarise data that may contain outliers. For the full picture of the same data — mean, median, mode, standard deviation and quartiles together — use the statistics calculator, and for the spread alone the standard deviation calculator.

    10% trim removes 20% of the data

    The trim is per side, and that is the first thing to get right. A 10% trim removes 10% from the low end and 10% from the high end — 20% of the data in total. On 10 values, 10% per side is 1 value from each end, so 2 of 10 values are gone before the averaging starts.

    Trim per sideRemoved in totalOn 20 values
    5%10%2 values, 1 from each end
    10%20%4 values, 2 from each end
    20%40%8 values, 4 from each end
    25%50%10 values, half the data

    The counts are rounded down, so on a small sample a small trim can remove nothing at all — 5% per side on 10 values is 0.5 per side, which rounds down to 0. Excel's TRIMMEAN works the other way round: it takes a percentage of the TOTAL, not per side. So Excel TRIMMEAN with 10% removes 10% in total — 5% per side — which is half the trim this calculator's 10%-per-side mode applies. That is a separate difference from the rounding rule in the next section, and it is why the two modes give different answers for the same percentage.

    The Excel trap: TRIMMEAN can trim nothing

    Excel's TRIMMEAN takes a percentage of the TOTAL number of values, then rounds the count down to the nearest even number — because it trims the same number from each end, the total trimmed must be even. On a small data set that rounding can wipe the trim out entirely.

    Take the worked example: 10 values, TRIMMEAN with 10%. Ten percent of 10 is 1 value. Rounded down to the nearest even number, 1 becomes 0. So Excel trims NOTHING and returns the plain mean, 25.3 — the outlier 100 is still in the average. The calculator's Excel TRIMMEAN mode shows this with an amber warning, so you can see it happening instead of trusting the number.

    Data sizeTRIMMEAN %CountRounded down to evenTrimmed
    1010%10Nothing — returns the plain mean
    1020%221 from each end
    1030%321 from each end
    2010%221 from each end
    10010%10105 from each end

    Check the trim before you trust the answer. If Excel TRIMMEAN returns exactly the plain mean, it may have trimmed nothing — 10% of 10 values rounds down to 0. Use 20% (2 values, 1 from each end) and it trims properly: on the worked example that gives 17.625, the same as a 10% trim per side.

    Trimmed mean vs median

    The median is the middle value once the data are sorted — it ignores everything except the middle. A trimmed mean keeps more of the data: at 10% per side on 10 values it still averages 8 of them. That makes the trimmed mean use more information than the median, while still resisting outliers. It is also less resistant than the median — a value just inside the trim still pulls it, while the median ignores it completely.

    Trim more and the two meet. At 50% per side only the middle value or values are left, so the trimmed mean IS the median. The calculator's "Trim 50% (the median)" preset shows this on the worked example: the middle two values are 17 and 18, and their mean is 17.5 — the median. For the difference between the mean, the median and the mode in general, read Mean vs Median vs Mode.

    When to trim, and when not to

    Trim when a few values are clearly errors or one-off extremes and you want the typical value: a typo (100 typed as 1000), a sensor spike, a single huge transaction in a week of ordinary ones. The trimmed mean answers "what is typical here?" without letting one wild value set the answer.

    Do not trim when the extremes are real data. Incomes, house prices and insurance claims are skewed by nature — the extremes ARE the story, and trimming them hides what matters. Do not trim when you are reporting a total either: trimming changes the sum, and a trimmed sum is not the sum of anything. And if you need to decide which values count as outliers in the first place, the quartile calculator gives you the quartiles and the IQR fences that flag them.

    Worked example 1 — one outlier, 10% and 20%

    Data: 12, 15, 14, 18, 16, 20, 22, 19, 17, 100.

    Plain mean 25.3, median 17.5. Trim 10% per side — remove 12 and 100 — and the trimmed mean is 17.625. Trim 20% per side — remove 12, 14, 22 and 100 — and the trimmed mean is 17.5, exactly the median. The outlier 100 lifts the plain mean 7.8 above the median, while the trimmed mean sits only 0.125 above it.

    Worked example 2 — the Excel trap

    Same data, Excel TRIMMEAN with 10%: 10% of 10 values is 1, rounded down to the nearest even number is 0, so Excel trims nothing and returns the plain mean, 25.3. Switch the calculator to Excel TRIMMEAN mode and it shows the same number with an amber warning: "Excel trimmed nothing here."

    Excel TRIMMEAN with 20% is different: 20% of 10 is 2, an even number, so 1 value comes off each end — 12 and 100 — and the result is 17.625, the same as a 10% trim per side. The percentage means something different in Excel (of the total) than it does here (per side), and the rounding rule can erase a small trim entirely.

    Worked example 3 — the test data, and 50%

    Data: 1, 2, 3, 4, 5, 6, 7, 8, 9, 100. Plain mean 14.5, median 5.5. Trim 10% per side — remove 1 and 100 — and the trimmed mean is the mean of 2 to 9, which is 44 / 8 = 5.5. Here the trimmed mean and the median agree exactly, because the kept values are symmetric around 5.5.

    Trim 50% per side on the worked example and the trimmed mean is the median, 17.5 — only the middle two values, 17 and 18, are left. Trim more than 50% per side and the calculator refuses: there would be nothing left to average. That is the limit of trimming, and it is also why the median is the most resistant average of all.

    Frequently asked questions

    Why did Excel trim nothing?

    Excel TRIMMEAN trims a percentage of the TOTAL number of values, then rounds the count down to the nearest even number. On 10 values, 10% is 1 value, and 1 rounds down to the nearest even number, 0 — so Excel trims nothing and returns the plain mean. Use 20% (2 values, 1 from each end) and it trims properly.

    Trimmed mean vs median?

    The median is the middle value once the data are sorted — it ignores everything except the middle. A trimmed mean keeps more of the data: at 10% per side on 10 values it still averages 8 of them. That makes the trimmed mean use more information than the median, while still resisting outliers. Trim 50% per side and the two meet — the trimmed mean becomes the median.

    All examples on this page were recomputed with Python (scipy.stats), last updated 19 November 2026.

    See all 91 free statistics tools.