Skip to content
Statculator
Descriptive Statistics

Trimmed Mean Calculator

Find the trimmed (truncated) mean with steps: cut a percentage from each end of the sorted data and average the rest. Also gives the winsorized mean.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try
20 values

Separate values with commas, spaces or new lines. They do not need to be sorted.

%

Share of values removed from each end. 10 removes the lowest 10% and the highest 10%; 25 gives the interquartile mean. In Excel’s TRIMMEAN, enter twice this value as a proportion (10 → 0.2).

Trims g = ⌊n × p⌋ values from each end of the sorted data, rounding down: the convention of SciPy, R and Excel.

Results

10% trimmed mean
310.8125
Mean of the middle 16 of 20 sorted values
Values trimmed
2 from each end
g = ⌊n × p⌋ = ⌊20 × 0.1⌋ = 2, so 4 removed in total
Values kept
16 of 20
From 290 to 340
Count, n
20
Ordinary mean
348.75
Median
309
10% winsorized mean
311.65
Interquartile mean (25% trimmed)
309.3
Sum of the kept values
4973
Share of the data removed, 2g / n
20%
Trimmed mean − ordinary mean
-37.9375
Trimmed mean − median
1.8125

Interpretation: After dropping the 2 smallest and 2 largest values, the mean of the remaining 16 is 310.8125. The ordinary mean is 348.75, so the trimmed tails were pulling it up by 37.9375. The median, 309, is the limit you reach by trimming as much as possible.

Measures of centre for this dataset

MeasureValues usedResultDifference from the ordinary mean
Ordinary meanall 20348.750
10% trimmed meanmiddle 16310.8125-37.9375
10% winsorized meanall 20, with 4 replaced311.65-37.1
Interquartile mean (25% trimmed)middle 10309.3-39.45
Medianmiddle 2309-39.75

Reading down the table, each measure pays less attention to the extremes. When all five agree closely, the data have no influential tails and the ordinary mean is a safe summary.

Sorted data: what was trimmed

RankValueStatusValue used in the winsorized mean
1120Trimmed (low end)290
2287Trimmed (low end)290
3290Kept290
4295Kept295
5298Kept298
6299Kept299
7301Kept301
8303Kept303
9305Kept305
10308Kept308
11310Kept310
12312Kept312
13315Kept315
14318Kept318
15322Kept322
16327Kept327
17330Kept330
18340Kept340
19345Trimmed (high end)340
201250Trimmed (high end)340

Highlighted rows are removed for the trimmed mean. For the winsorized mean they are not removed but replaced by the nearest kept value (290 at the low end, 340 at the high end).

Step-by-step solution

  1. 1

    Sort the data from smallest to largest

    Sorted (n = 20): 120, 287, 290, 295, 298, 299, 301, 303, 305, 308, 310, 312, 315, 318, 322, 327, 330, 340, 345, 1250
  2. 2

    Work out how many values to trim from each end

    Multiply n by the trim proportion and round down to a whole number.

    p = 10 / 100 = 0.1
    g = ⌊n × p⌋ = ⌊20 × 0.1⌋ = ⌊2⌋ = 2
  3. 3

    Remove the 2 smallest and the 2 largest

    Removed from the low end: 120, 287
    Removed from the high end: 345, 1250
    Kept (16 values): 290, 295, 298, 299, 301, 303, 305, 308, 310, 312, 315, 318, 322, 327, 330, 340
  4. 4

    Average the values that are left

    Sum of kept values = 4973
    Trimmed mean = 4973 / 16 = 310.8125
  5. 5

    Winsorized mean: replace instead of remove

    Each of the 2 lowest values becomes 290 and each of the 2 highest becomes 340; then all 20 values are averaged.

    Winsorized sum = 2 × 290 + 4973 + 2 × 340 = 6233
    Winsorized mean = 6233 / 20 = 311.65
  6. 6

    Compare with the ordinary mean and the median

    Ordinary mean = 6975 / 20 = 348.75
    Median = 309
    Trimmed mean − ordinary mean = 310.8125 − 348.75 = -37.9375

What is a Trimmed Mean Calculator?

A trimmed mean is the average of a dataset after a fixed percentage of the smallest and largest values has been removed from each end. This trimmed mean calculator sorts your data, cuts g = ⌊n × p⌋ values from each tail and averages the rest, with every step shown. A 10% trimmed mean of 20 values drops the 2 smallest and 2 largest and averages the middle 16. It resists outliers better than the mean and uses more of the data than the median. The tool also returns the winsorized mean and the interquartile mean.

What the Trimmed Mean Calculator does

Enter your data and a Trim percentage (each tail). The calculator removes g = ⌊n × p⌋ values from each end of the sorted list, averages the rest, and marks every trimmed value in a table so you can see exactly what was left out. Beside the trimmed (truncated) mean it reports the winsorized mean, which replaces the extreme values with the nearest kept value instead of deleting them, and the interquartile mean, the 25% trimmed mean.

A trimmed mean is a compromise between the mean, which uses every value and is dragged by outliers, and the median, which ignores everything except the middle. Use it when the data are mostly well behaved but a few values are suspect: reaction times with lapses, judges’ scores, prices with data-entry errors, or any heavy-tailed measurement. The comparison table lines the five measures up so you can see how much the tails matter.

How to use the Trimmed Mean Calculator

  1. Type or paste your numbers into Data values, in any order.
  2. Enter the Trim percentage (each tail): 10 for a 10% trimmed mean, 25 for the interquartile mean, or 0 for the ordinary mean. The value must be below 50.
  3. Read the trimmed mean, how many values were removed from each end and how many were kept.
  4. Compare it with the ordinary mean, winsorized mean, interquartile mean and median in the table, and check the sorted-data table to see which values were trimmed.

Trimmed Mean formula

Sort the data so that x₁ ≤ x₂ ≤ … ≤ xₙ. With trim proportion p per tail, g values are cut from each end.

Number trimmed from each end
g = ⌊n × p⌋
Trimmed (truncated) mean
x̄ₜ = (x₍g+1₎ + x₍g+2₎ + … + x₍n−g₎) / (n − 2g)
Winsorized mean
x̄w = [ g·x₍g+1₎ + (x₍g+1₎ + … + x₍n−g₎) + g·x₍n−g₎ ] / n
Interquartile mean
trimmed mean with p = 0.25
Formula symbols
SymbolMeaning
x₍ₖ₎k-th smallest value
nnumber of values
pproportion trimmed from each tail (0.10 for 10%)
gwhole number of values removed from each end
⌊ ⌋round down to a whole number

Rounding convention. When n × p is not a whole number this calculator rounds down, which matches scipy.stats.trim_mean, R’s mean(x, trim = p) and Excel’s TRIMMEAN. Some textbooks round to the nearest whole number, and some packages give the boundary values a fractional weight so that exactly n × p values are removed. For small n these choices can change the answer; the note under the results tells you when that applies.

Because of the rounding, the interquartile mean shown here is the exact textbook interquartile mean only when n is divisible by 4.

p = 0 gives the ordinary mean. As p approaches 0.5 the trimmed mean becomes the median.

Worked example

Worked example: reaction times with two bad trials

Problem. A participant’s 20 reaction times (ms) are 312, 298, 345, 287, 301, 330, 295, 1250, 318, 305, 290, 322, 340, 299, 310, 308, 120, 327, 315, 303. One trial was an anticipation (120 ms) and one a lapse (1250 ms). Find the 10% trimmed mean.

  1. 01Sort: 120, 287, 290, 295, 298, 299, 301, 303, 305, 308, 310, 312, 315, 318, 322, 327, 330, 340, 345, 1250.
  2. 02Number to trim: g = ⌊20 × 0.10⌋ = 2 from each end.
  3. 03Remove 120 and 287 from the low end and 345 and 1250 from the high end, leaving 16 values from 290 to 340.
  4. 04Sum of the 16 kept values = 4,973, so the trimmed mean is 4,973 / 16 = 310.8125 ms.
  5. 05Winsorized mean: replace 120 and 287 with 290, and 345 and 1250 with 340: (2 × 290 + 4,973 + 2 × 340) / 20 = 6,233 / 20 = 311.65 ms.
  6. 06For comparison, the ordinary mean is 6,975 / 20 = 348.75 ms and the median is (308 + 310) / 2 = 309 ms.

Answer. The 10% trimmed mean is 310.81 ms. The ordinary mean, 348.75 ms, is higher than 19 of the 20 trials because of the single 1250 ms lapse; the trimmed mean sits with the bulk of the data, close to the median of 309 ms.

Trimmed mean versus winsorized mean

Both methods limit the influence of the g most extreme values at each end. Trimming deletes them, so the average is taken over n − 2g values. Winsorizing keeps the sample size at n but pulls each extreme value in to the nearest value that was kept, on the view that an extreme observation is still evidence of a high or low result even if its exact size is not trusted.

The winsorized mean therefore leans slightly further towards the tails than the trimmed mean. In the reaction-time example the two are 311.65 and 310.81 ms. Winsorized values are also what you need for the standard error of a trimmed mean, which is why the two are usually reported together.

MethodWhat happens to the extremesValues averagedTypical use
Ordinary meanNothingnClean, roughly symmetric data
Trimmed meanRemovedn − 2gRobust estimate of the centre; judging panels
Winsorized meanReplaced by the nearest kept valuenRobust variance estimates; finance and survey data
MedianAll but the middle one or two removed1 or 2Strongly skewed data

Trimmed mean in Excel, R and Python

The main trap is that Excel’s TRIMMEAN takes the total fraction removed from both ends together, while R, SciPy and this calculator take the fraction removed from each end. A 10% trimmed mean here is TRIMMEAN(range, 0.2) in Excel.

With the 20 reaction times from the worked example in cells A1:A20, =TRIMMEAN(A1:A20, 0.2) returns 310.8125, the same as a 10% trim per tail in this calculator. Excel works out 20 × 0.2 = 4 values to exclude and splits them 2 and 2. If n × percent is odd or not a whole number, Excel rounds down to the nearest even number, so it always removes the same count from each end. Google Sheets’ TRIMMEAN behaves the same way.

Tool10% trimmed mean (10% from each end)Rounding of n × p
This calculatorTrim percentage = 10Down
Excel / Google SheetsTRIMMEAN(range, 0.2)Down (to an even total)
Rmean(x, trim = 0.1)Down
Python (SciPy)scipy.stats.trim_mean(x, 0.1)Down

Common use cases

  • Judging and scoring panels: drop the highest and lowest scores before averaging so one judge cannot swing the result.
  • Reaction-time and timing data: damp the effect of anticipations and lapses without discarding trials by hand.
  • Economic indicators: trimmed-mean inflation measures remove the most extreme price changes each month to show the underlying trend.
  • Data with occasional recording errors: get a sensible average before you have had time to investigate each suspicious value.
  • Robust reporting: show the trimmed mean beside the mean; a large gap is itself a finding about the tails.

Assumptions and limitations

  • Trimming removes the same number of values from each end whether or not they are outliers. With skewed data that shifts the estimate towards the median and it no longer estimates the population mean.
  • The trim percentage should be chosen before looking at the results. Picking the percentage that gives the answer you prefer is a form of data dredging.
  • A trimmed mean protects against at most g wild values per end. If more than that share of the data is contaminated, use the median and the median absolute deviation.
  • It does not tell you which values are outliers. To flag them explicitly, use the 1.5 × IQR fences.
  • Totals cannot be recovered from a trimmed mean: multiplying it by n does not give the sum of the data. For budgets and totals, use the ordinary mean.

Frequently asked questions

What is meant by trimmed mean?

A trimmed mean (also called a truncated mean) is the ordinary average of the data that remain after an equal share of the lowest and highest values has been discarded. It sits between the mean, which uses every value, and the median, which uses only the middle one or two, so it resists outliers while still averaging most of the data.

How do you calculate a trimmed mean?

Sort the values, work out g = ⌊n × p⌋ where p is the proportion to cut from each end, delete the g smallest and g largest values, and average the rest. For a 10% trimmed mean of 20 values, g = 2, so you average the middle 16 values.

Does a 10 percent trimmed mean remove 10% in total or 10% from each end?

In statistics the percentage almost always refers to each end, so a 10% trimmed mean removes 20% of the data in total. That is the convention used by this calculator, R and SciPy. Excel’s TRIMMEAN is the exception: its percent argument is the total, so you enter 0.2 to get a 10% trimmed mean.

What does a 20% trimmed mean mean?

A 20% trimmed mean removes 20% of the values from each end, 40% of the data in total, and averages the middle 60%. With 10 values (2, 4, 5, 6, 7, 8, 9, 10, 11, 40), g = ⌊10 × 0.2⌋ = 2, so 2, 4, 11 and 40 are dropped and the mean of 5, 6, 7, 8, 9 and 10 is 7.5, against an ordinary mean of 10.2. The 20% trim is widely recommended in robust statistics as a good balance between efficiency and resistance to outliers.

How do you calculate a trimmed mean in Excel?

Use =TRIMMEAN(range, percent), where percent is the total share to exclude from both ends together. For a 10% trimmed mean (10% from each end) enter 0.2; for a 20% trimmed mean enter 0.4. Excel rounds the number excluded down to an even count and splits it equally between the two ends, which gives the same answer as this calculator, R’s mean(x, trim = 0.1) and SciPy’s trim_mean(x, 0.1).

What is the difference between a trimmed mean and a winsorized mean?

A trimmed mean deletes the most extreme values and averages the rest. A winsorized mean keeps every observation but replaces the extreme ones with the nearest remaining value before averaging. Winsorizing keeps the sample size at n and leans slightly more towards the tails than trimming does.

What trim percentage should I use?

Between 5% and 25% per tail covers most practical uses. Ten percent is a common light trim, 20% is often recommended in robust statistics because it stays efficient for normal data while resisting heavy tails, and 25% gives the interquartile mean. Decide before analysing the data and report the percentage you used.

What is the interquartile mean?

The interquartile mean is the 25% trimmed mean: the average of the middle half of the sorted data, after the lowest quarter and the highest quarter are removed. It uses the same central values that the interquartile range spans, and it is more stable than the median because it averages several values.

Why does my textbook get a different trimmed mean?

Usually because n × p is not a whole number. This calculator rounds the number of trimmed values down, as R, SciPy and Excel do. Some textbooks round to the nearest whole number, and some methods trim a fraction of an observation by weighting the boundary values. With 15 values and a 10% trim, rounding down removes 1 value per end, while rounding 1.5 up removes 2.

Is the trimmed mean the same as the truncated mean?

Yes. Truncated mean and trimmed mean are two names for the same statistic: the mean of the data after an equal share of the smallest and largest values has been discarded. The name “Olympic average” is also used when exactly one value is dropped from each end.

Cite this page

Statculator. (2026, November 14). Trimmed Mean Calculator. Retrieved November 14, 2026, from https://statculator.com/descriptive-statistics/trimmed-mean-calculator/