Calculating Percents: A/B vs. B/A

  • B
  • Thread starter 1plus1is10
  • Start date
In summary, the conversation discusses the use of the percent difference formula to calculate the difference between two values and the importance of choosing a reference value. The possibility of using one calculation to get a 25% result in both scenarios is explored, and a trick involving the arctangent function is presented. However, in the end, it is recommended to keep using the simpler calculation of min(A,B)/max(A,B) * 100.
  • #1
1plus1is10
51
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
  • #2
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
  • #3
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.
 
  • #4
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
 
  • #5
Also... Thanks Mark44 for your explanation and efforts.
 
  • #6
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.
 
  • #7
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.
 
  • #8
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) ));
 

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

1. What is the difference between A/B and B/A when calculating percents?

When calculating percents, A/B represents the part over the whole, while B/A represents the whole over the part. This means that A/B will give you the percentage of the whole that is made up by the part, while B/A will give you the percentage of the part in relation to the whole.

2. Which method should I use when calculating percents?

The method you use depends on what information you have and what you are trying to find. If you know the part and the whole, use A/B. If you know the whole and the percentage, use B/A. If you know the part and the percentage, you can use either A/B or B/A to find the missing value.

3. How do I convert a decimal to a percent?

To convert a decimal to a percent, multiply the decimal by 100. For example, 0.5 would be converted to 50% (0.5 x 100 = 50).

4. Can I use a calculator to calculate percents?

Yes, you can use a calculator to calculate percents. Most calculators have a percentage button (%) that you can use to easily find percentages. Just make sure you are using the correct method (A/B or B/A) depending on the information you have.

5. How do I check my percent calculation for accuracy?

To check your percent calculation, you can use the formula (part/whole) x 100 = percentage. Substitute your values and see if the result is the same as the one you calculated. If it is, then your calculation is accurate.

Similar threads

Replies
1
Views
2K
Replies
1
Views
1K
Replies
9
Views
2K
Replies
5
Views
1K
  • General Math
Replies
1
Views
731
  • General Math
Replies
2
Views
2K
Replies
12
Views
3K
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
4K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Back
Top