# A tool to calculate percentage difference from multiple numbers

I have a bunch of different numbers like 235, 312, 324, 156, 267 and so on. I'd like to be able to assign a 100% value to one these numbers, and the rest would be shown as the percentage accordingly.

So from above example if I say 312 is 100%, 156 would show up as 50% and so on. I need to do it on many sets of numbers. Is there something like that available as a Mac or iOS or maybe web app? Thanks!

• Do you want to enter these numbers manually? If not, how are these numbers stored? For instance, in a text file? – Nicolas Raoul Feb 22 '16 at 4:18
• There are about 50 numbers in each set, so it would be great if I wouldn't have to enter them manually. They are stored in a CSV file, each set is one row. – EmilyM Feb 22 '16 at 13:54
• Any spreadsheet-like app that lets you import the CSV will do. So online you could e.g. use Google sheets. – user416 Feb 22 '16 at 20:56

Since it is OK for you to run it online I strongly recommend to make a Google Sheet for this task so you can access it from everywhere and also to manipulate easily CSV records (import - export) as you mentioned.

This is how I created it (at the end there is a link for it but I will also give instructions in case the link is not working for others at future):

2. Use the first column (let's say A) to enter your multiple numbers or paste them massively from your CSV.

3. The second column (let's say B) will be used to calculate the percentage differences for each value from the left

In this part you have to input the following calculating formula to all column cells. You can paste it in all cells at once by selecting the Column Letter holding the cmd or ctrl button and then paste by holding cmd+enter or ctrl+enter.

`=(-100)+INDIRECT(ADDRESS(ROW();COLUMN()-1))/XX*100`

• note the XX value for the next step, so is better to already know which cell you are going to use on Step 4
• (-100) at begining is important so it gives you positive percentage numbers when the values are bigger from the base value.

4. Finally on another cell (let's say 2nd cell from E column) use it as an input for base number on which you want to calculate the percentage difference for each number you input

Now let's say that for this step you use the cell E2. You will replace the XX with that cell, like

`=(-100)+INDIRECT(ADDRESS(ROW();COLUMN()-1))/E2*100`

You will have the following result (I reformatted it for visually improvement) I published it here so you can examine it or download and start using it.

PS If you need to find how much "far" or "close" is the percentage of the input number to the base number, you can add +100 at the end of the formula.

• This is really great, thank you! Is it correct that if I append '+100' to your formula, it will give me actual percentage of the base number? So 111 becomes 92,5% of 120? I've only tried it on simple numbers yet, not on the actual data so I'm not sure if it will throw something off with complex numbers. – EmilyM Feb 22 '16 at 20:29
• @EmilyM you can also do what you've suggested, it will work fine. I understood that you needed to find the percentage difference from the base number and not how "close" or "far" is the percentage from input number to the base. Feel free to change it with a +100 at the end ! (I edited my answer at the end adding description of this option too) – Vasikos Feb 22 '16 at 20:39

I suggest using either LibreOffice (offline) or Google Spreadsheet (online), both are free.

1. Put your numbers in the first column (from cell A1).
2. Put `=100*A1/ MAX(A:A)` in cell B1.
3. Click the blue square (visible below) and drag down to copy/alter the formula to as down as you want, for instance to line 100. See my sample.

It presumably works with any other spreadsheet program too.