1
$\begingroup$

Hi I have a range and percent of that range. I want to calculate the value of that percentage.

for exam:

min = -5
max = 30
percentage = 8%

value = ?

Value should be a 8% of the range of (-5 .. 30)

$\endgroup$
  • $\begingroup$ The question is all but trivial since percentage is a linear function of the value given the range. Have you tried to solve for it? $\endgroup$ – Saad Jan 8 '18 at 5:31
  • $\begingroup$ I don't know math and yes I tried ! $\endgroup$ – Vahid Jan 8 '18 at 5:32
  • $\begingroup$ Calculate the $8\%$ point of the range $[0,35]$ then shift it down by $5$. $\endgroup$ – dxiv Jan 8 '18 at 5:34
1
$\begingroup$

Since$$ \text{percentage} = \frac{\text{value} - \min}{\max - \min} \times 100\%, $$ then$$ \text{value} = \min + (\max - \min) \times \text{percentage}. $$

$\endgroup$
  • $\begingroup$ Thanks, It works :-) $\endgroup$ – Vahid Jan 8 '18 at 5:40
0
$\begingroup$

Find $8\%$ of $30-(-5)$. That is $$\frac{8}{100}\times 35=m.$$ Then what you want is $-5+m$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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