-
easy question
if I have two numbers, a previous number and a current number. What formula would I use to find out the percentage difference between the two numbers.
I did try and use (previous - current) * 100 / previous but it doesn't always work.
any ideas.
this should be easy.
-
the percentage difference between what numbers?
if the numbers are from 1 to 100 or something then yea, but you cant really take a percentage differnce of 2 numbers unless theres a specific range
-
example.
previous number is 500, current number is 550.
What is the percentage change between these 2 numbers.
-
CN = (CN/PN)*PN
PN = (PN/CN) * CN
So CN = 100*(CN/PN)% of PN
and
PN = 100*(PN/CN)% of CN
Now, with CN = (CN/PN)*PN, I would say that
PN changed by 100*((CN/PN) - 1)% to become CN.
Which can be seen by
PN + change = CN
if we say that change = ((CN/PN)-1)*PN then
PN + ((CN/PN)-1)*PN is indeed = CN
So, PN to CN does indeed change by 100*((CN/PN)-1)% of PN.
-Lou
-
-
I didn't check his logic, but I'm sure it's accurate.
100*((CN/PN)-1)% of PN = 100*((Current Number/Previous Number)-1) = The percent the Current Number differs from the Previous Number
-
Maybe he wants PN as a percentage of CN?
Wouldn't that be a simple (CN / PN) * 100?
If PN = 500, and CN = 550, then CN is 110% of PN.
-
Basically, thats exactly what Lou (NotLKH)'s code does, except it subtacts 1 (100%), making it x percent more than the first number instead of x percent of the first number, although you're exactly right about what you're saying.