I'm having some logic/math problems in a program I'm trying to fix. So, suppose I have three values, 30, 25 and -15. The sum of these values is always going to be 100%. But I also need to know which percentile out of 100 the -15 is, if there is any, since the negative numbers need to be counted in the total sum. If I count the sum as 40, as in adding 25 and (-15), it's easy, but I wouldn't be able to know which percentile was the -15 because it is now a +10. I've used this formula: P% * X = Y where P is what % of X is Y but for it I would have to count 40 as being total, but I don't think I can just sum the numbers up. Does this make any sense? I'm sorry for not being able to be clear enough.
2026-03-27 17:57:44.1774634264
On
How to find which percentile out of 100 a negative number is?
2.4k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
"Percentile" does not mean
- "percentage ratio of the sample value to mean"
- "percentage ratio of the sample value to the sum."
It means
- "percentage fraction of samples less than the given sample" or
- "percentage fraction of samples less than or equal to the given sample" or
- rounded or interpolated variations thereof, dependent on who you ask.
For your samples, the percentile of each sample depends on the definition, but
- for $-15$ is $0$ at least, $34$ at most;
- for $25$ is $33$ at least, $67$ at most; and
- for $30$ is $66$ at least, $100$ at most.
The only (somewhat) sensible calculation I can give you is the following: just follow the same rules that you follow when all the numbers are positive:
As you see, some percentages will end up being negative. In this case, you end up with the following percentages: $75\%, 62.5\%, -37.5\%$ which do add up to $100\%$.
It is the whole other question whether this calculation gives you what you need. (I cannot tell from your question alone.)
Also note, if your numbers add up to $0$, this calculation does not make sense.