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

I have a range of number that are coming in from 0 - 1 for example: 0.178 0.45 0.89 0.41

The highest they can go is 1.0

I would like to convert these into a scale going from 1 - 180

So if the number that came in was 0.5

share|cite|improve this question
Let $x \in [0,1]$. Then $y = 179x+1$. – Joshua Shane Liberman Dec 7 '12 at 19:17

In general, you are looking for an affine transformation of the variable $0 \le x \le 1$ to some other domain $a \le y \le b$.

The general form of this is

$$y = (b-a)x + a$$

In your case, $b = 180$, $a = 1$, so you get, as Joshua said in his comment,

$$y = 179x+1.$$

This works for all $b > a$, but if you have $x$ defined in some other interval, you have to be more careful!

share|cite|improve this answer

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.