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 am not really sure what this operation might be called, but I have some numbers, for example:



I need to format these numbers so that they form the sum 1, but they should keep their "weight".

In this specific case

40 would become 0.80, and 10 would become 0.2

But if I have more values (like 40, 10, 25, 5 for example), I am really lost because I don't know the formula.

If anybody can help, could he please reply in words (for example: "Sum up all values then divide through...", and not in a formula? I am really not good at reading formulas at all.

Thank you so much!

share|cite|improve this question
how should $[40,10]$ become $[0.75,0.25]$? $\frac{40}{10} \neq \frac{0.75}{0.25}$ – Jan Dvorak Jan 14 '13 at 6:38
Shouldn't $[40,10]$ become $[0.8,0.2]$? Then it's easy - just divide each element by the sum. – Jan Dvorak Jan 14 '13 at 6:43
@Jan Dvorak Thank you very much!! Can you please set your reply as an answer? – tmighty Jan 14 '13 at 6:50
Answer posted . – Jan Dvorak Jan 14 '13 at 6:52
up vote 4 down vote accepted

Why not just divide each number in your sample by the sum of all the numbers in your sample?

share|cite|improve this answer

From the text description, it seems this is what you want:

  • calculate the sum of all elements
  • divide each element by the sum

Note that, however, then your example $[40, 10]$ normalises as $[0.8, 0.2]$, not $[0.75,0.25]$. The latter doesn't preserve the ratio of both elements.

share|cite|improve this answer

Divide $100$ by the sum which is $80$ to get $1.25$. Then you multiply the the terms and use simple proportion where $80*1.25=100$ is proportional to one. You will get answers like $05,0.125,0.3125$ and $0.0625$.

share|cite|improve this answer

Just divide all the numbers through by 50. Should normalise it to the scale you want 0 - 1. For example: 40/50 = 0.8 25/50 = 0.5 5/50 = 0.1


I think you get the idea!

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.