How do I adjust one percent in a set and maintain the remaining proportions in the set?

41 Views Asked by At

Say I have the following ingredients in the following percents:

+-------+----------+
| Name  | percent  |
+-------+----------+
| Ing1  |        2 |
| Ing2  |       35 |
| Ing3  |       30 |
| Ing4  |       33 |
| total |      100 |
+-------+----------+

If I want to increase Ing1 to 5%, how do I adjust the rest of the ingredients to maintain their proportions to each other?

If I use the following formula (increase + increase/100 or 3 + 3/100) to calculate the successive increase I get an increase value of 3.03 (or 0.0303%). If I then adjust the remaining ingredients by that percent (orig - orig*0.0303) I get the following:

+-------+------+----------+
| Name  | orig | adjusted |
+-------+------+----------+
| Ing1  |    2 | 5        |
| Ing2  |   35 | 33.9395  |
| Ing3  |   30 | 29.091   |
| Ing4  |   33 | 32.0001  |
| total |  100 | 100.0306 |
+-------+------+----------+

Which leaves me 0.0306 over 100%. What is my mistake or what would be a better way to calculate this?

Thanks,

2

There are 2 best solutions below

2
On

Solve

newIng1 / (newIng1 + oldIng2 + oldIng3 + oldIng4) = 5%

to find newIng1.

Then you divide each of newIng1, oldIng2, oldIng3, oldIng4 by the sum

newIng1 + oldIng2 + oldIng3 + oldIng4

to get 100%.

0
On

Thanks for your help but here is a solution I found that I like.

1)From the adjusted chart I can just see how much over/under the total percent is. In this case 3.

2) Then I can see the total percent left that I can spread this out over. In this case 35+30+33=98

3) Now for each value left I can do value - (per/98 * 3). Which gives me the following:

+-------+------+----------+-------------+
| Name  | orig | adjusted |    final    |
+-------+------+----------+-------------+
| Ing1  |    2 |        5 | 5           |
| Ing2  |   35 |       35 | 33.92857143 |
| Ing3  |   30 |       30 | 29.08163265 |
| Ing4  |   33 |       33 | 31.98979592 |
| total |  100 |      103 | 100         |
+-------+------+----------+-------------+