B Calculating Percents: A/B vs. B/A

  • B
  • Thread starter Thread starter 1plus1is10
  • Start date Start date
AI Thread Summary
Calculating percentages can be confusing when the larger number is not consistently on the bottom. The discussion highlights that when comparing two numbers, A and B, the base used for the percentage calculation significantly affects the result. The percent difference formula is suggested as a solution to provide a consistent way to compare values, regardless of which is larger. A method involving the average of the two numbers is proposed to avoid confusion about the reference value. Ultimately, the simplest approach is to use the percent difference formula for clarity and consistency in calculations.
1plus1is10
Messages
51
Reaction score
0
In a perfect world, whenever I need to calculate a percent, the biggest number would be on the bottom.
A=3, B=4
A/B = 3/4 = 0.75 * 100 = 75%
Wonderful - I can easily know I am 25% away from 100%.

Unfortunately, I often have the numbers swapped (A is bigger than B):
A=4, B=3
A/B = 4/3 = 1.333333 * 100 = 133%
Not wonderful - it is now 33% away from 100%

Is it possible to do one calculation to give me 25% in both scenarios?

I've toyed with many "stupid" ideas like:
abs(A-B) / ((A+B)/2)

I would even be happy to have something log/exp based rather than percent.
As long as the result could be used to compare A and B, and then also C and D, etc.

Thanks for any help and ideas.
 
Mathematics news on Phys.org
Its not to clear what you are trying to do. The idea you called stupid is the percent difference formula, which is what you want to use for getting the percent difference. so the percent difference of 3 and 4 is ~28.6%.

Or do you mean in general talking where people say something like 'we have a 50% improvement in sales'. In that case you just need to know the previous value to work it out. In the example you gave, like both statements are correct. 3 is 75% of 4, and 4 is 133% of 3. In this sales analogy people would say (3->4) 'Our sales increased 33% this month'. For 4->3 they would say 'our sales dropped 25% this month
 
  • Like
Likes DrewD and 1plus1is10
1plus1is10 said:
In a perfect world, whenever I need to calculate a percent, the biggest number would be on the bottom.
A=3, B=4
A/B = 3/4 = 0.75 * 100 = 75%
Wonderful - I can easily know I am 25% away from 100%.

Unfortunately, I often have the numbers swapped (A is bigger than B):
A=4, B=3
A/B = 4/3 = 1.333333 * 100 = 133%
Not wonderful - it is now 33% away from 100%
I wouldn't say "away from" as you lose information about whether there was an increase or a decrease. It would be better to say that 4 is a 33 1/3% increase from 3, or that 3 is a 25% decrease from 4.

The difference here is that the base that you compare to is different in each case: 4 divided by 3 in the first case, and 3 divided by 4 in the second case.
1plus1is10 said:
Is it possible to do one calculation to give me 25% in both scenarios?
No, because the base will be different in the two scenarios.
At least if I understand what you are asking.
1plus1is10 said:
I've toyed with many "stupid" ideas like:
abs(A-B) / ((A+B)/2)

I would even be happy to have something log/exp based rather than percent.
As long as the result could be used to compare A and B, and then also C and D, etc.

Thanks for any help and ideas.
 
SaskatoonGuy said:
The idea you called stupid is the percent difference formula, which is what you want to use for getting the percent difference.
Okay, so - I thought I invented it.
Thanks to you, I have a name and was able to Google it: "percent difference formula"

How about that - MathIsFun explained it to me:
https://www.mathsisfun.com/percentage-difference.html

To Quote Them:
Because there is no obvious way of choosing which value is the "reference" value...
it is best to choose a value halfway between so there is no confusion.

Thank you very much, SaskatoonGuy
 
Also... Thanks Mark44 for your explanation and efforts.
 
1plus1is10 said:
To Quote Them:
Because there is no obvious way of choosing which value is the "reference" value...
it is best to choose a value halfway between so there is no confusion.
It depends on the origin of the numbers.
If you invested $1000 and got $1100 in return, you gained 10%. The reverse direction is not really meaningful.
 
mfb said:
It depends on the origin of the numbers.
If you invested $1000 and got $1100 in return, you gained 10%. The reverse direction is not really meaningful.
The two directions are meaningful in the sense of Future Value and Present Value of investments.
 
The MathIsFun page explains "When Should I Use It?" = "when both values mean the same kind of thing - i.e. heights of two people"
"when there is an old value and a new value, you should use Percentage Change" (which is what you all are pointing out).

As to my original question:
"Is it possible to do one calculation to give me 25% in both scenarios?"

Well, after playing with the Percent Difference formula, I found a trick.
(although I break it up into separate calculations for clarity)

Pct = min(A,B)/max(A,B) * 100;
Diff = abs(A-B) / ((A+B)/2);
Near = atan( atan(Diff) ); <--trick--<<<
Diff = 100 - (Diff*100);
Near = 100 - (Near*100);

Pct = Diff = Near
100 = 100 = 100
95 = 95 = 95
90 = 89 = 90
85 = 84 = 84
80 = 78 = 78
75 = 71 = 73
70 = 65 = 67
65 = 58 = 62
60 = 50 = 57
55 = 42 = 52
50 = 33 = 47
45 = 24 = 42
40 = 14 = 38
35 = 4 = 35
30 = -8 = 31
25 = -20 = 28
20 = -33 = 25
15 = -48 = 23
10 = -64 = 20
5 = -81 = 18
0 = -100 = 16

In the end, I think I will K.I.S.S. and keep using:
Pct = min(A,B)/max(A,B) * 100;

I would need to write too big of a comment to explain this to myself later:
Hack = atan( atan( abs(A-B) / ((A+B)/2) ));
 
Back
Top