# How to calculate percentage value inside arbitrary range with results between -100% and +100%

Sorry in advance if this is a very simple question and thanks for any help you might have.

I have a value of $3.82$.

I want to have a minimum and maximum difference allowance of say 1. So

min $= 3.32$ max $= 4.32$

I would like the min to be represented as -100% and max to be 100%. Essentially 3.82 would be 0%.

I have another value that is $3.54$. With the above in mind, how do I work out what percentage this number would be in my scale?

I did have a go using this formula but it gives me a scale of 0 to 200. Which isn't want I'm after, which is a scale of -100 to 100. How to calculate percentage of value inside arbitrary range?

Thanks again!

Jim

## 2 Answers

It would make more sense to consider this symbolically

If you have min = $x$, max = $y$, then you have a range $y-x$

to calculate where a number $z$ lies on this range calculate

$200 \times (z-x)/(y-x) - 100$

For your example:

$200 \times(3.54-3.32 )/(4.32-3.32)-100 = -56$

• Just so I'm clear. Why do I multiply by 200 and subtract by 100? – Jim Oct 5 '15 at 14:52
• For a normal percentage range (0% at the start and 100% at the end) you would just multiply by 100 and subtract nothing. Subtracting the 100 just shifts the minimum of the percentage range (to -100) and multiplying by 200 rescales it to the new size of the percentage range (100- (-100)) = 200 – David Oct 6 '15 at 11:29

Let your value, for which %age is to be calculated, be 'x'.

Let the middle value, in this case, 3.82 be 'y'.

and the minimum and maximum difference allowance, here 1, be 'd'.

Then, the formula to be used would be:

$$\frac{(x - y)}{d/2} * 100$$

This gives you the range of -100% to 100%.