Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
min = 0
max = 100
v = 50

Given those values, I can calculate the percentage of "completion" for v within the range [min,max] like this:

(100.0 / max) * v

And I get 50% - the desired value.

As you can see, I don't even use the min variable. So I have problems when this happens:

min = -100
max = 100
v = -50

I would expect the above values to produce 25%. But clearly, my earlier formula can't do that.

What can I do to calculate such values then? What changes are necessary?

share|cite|improve this question
up vote 3 down vote accepted

The length of the interval $[min,max]$ is $$max-min=100-(-100)=100+100=200$$

The length of the interval $[min,v]$ is $$v-min=(-50)-(-100)=-50+100=50$$

So the completion for $v$ is $$\frac{50}{200}=25\%$$

Note that in your first case $min$ was $0$ so $\frac{v-min}{max-min}\cdot100$ equaled $\frac{v}{max}\cdot100=\frac{100}{max}\cdot v$ so your formula worked in this case because $min$ equaled $0$ and did not work in the second case because $min$ did not equal $0$ .

share|cite|improve this answer
Works. Thank you. – Zol Tun Kul Sep 25 '12 at 1:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.