Ok, so say that I have a current rating average: 3.3/5

Now I want to say to remove a rating of 4. How do I find the new average? Or is this even possible?

  • 1
    $\begingroup$ To find the new average, you should know the number of observations. $\endgroup$
    – detnvvp
    Commented Sep 14, 2013 at 17:45
  • $\begingroup$ So I all I have is that the current average is 3.3, without knowing how many ratings I had to get there I can't do this? How would I do it if I did know? $\endgroup$ Commented Sep 14, 2013 at 17:54
  • $\begingroup$ If the current average is $3.3$, based on $n$ "tests", then the sum of the marks is $3.3n$. Remove the $4$, divide by $n-1$ for the revised average $\frac{3.3n-4}{n-1}$. $\endgroup$ Commented Sep 14, 2013 at 17:58
  • $\begingroup$ You need to know the number of ratings. If the average was based on many ratings, then removing one would have little effect. On the other hand, if the average was based on two ratings, then removing one could have a significant effect. $\endgroup$
    – copper.hat
    Commented Sep 14, 2013 at 17:59

3 Answers 3


To fix the problem of thirdender, and put it on a programmatic way.

Substract a value:

average = ((average * nbValues) - value) / (nbValues - 1);

Add a value:

average = average + ((value - average) / nbValues);

If you know the number of observations, say it is $N$, then, if $x_1,\dots x_N$ are the observations, you have that $\sum_{i=1}^Nx_i=3.3N/5$. Therefore, the new average will be $\frac{3.3N/5-4}{N-1}$.

If you don't know the number of observations, you can't find the new average. Your observations could be, for example, $x_1=4/5,x_2=2.6/5$ or $x_1=4/5,x_2=5.9/5,x_3=0$, and in the first case the new average is $2.6/5$, while in the second the new average is $2.95/5$.


For any computer programmers finding this question, the code is very simple.

function removeFromAverage(value, average, samples) {
  if (samples <= 1) {
    return FALSE;
  let newAverage = ((average * samples) - value) / (samples - 1);
  return newAverage;

value is the value you want to remove from the average, and samples is the number of observations included in the previous average. The if statement is only there in case one sample is used in the previous average, in which case removing that single value would result in zero samples and no calculable average.

  • 1
    $\begingroup$ This algorithm is not correct. The average of [7,3,2,8] is 5. If you remove 2 from the list, resulting in [7,3,8], the new average is 6. You algorithm returns -0.3333, which is not the difference between 5 and 6. $\endgroup$
    – Nepoxx
    Commented Apr 15, 2015 at 16:10
  • $\begingroup$ Thanks to Hassan, the answer has been updated $\endgroup$
    – thirdender
    Commented Sep 1, 2022 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .