1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Mar 15, 2017 #1
    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.
     
  2. jcsd
  3. Mar 15, 2017 #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
     
  4. Mar 15, 2017 #3

    Mark44

    Staff: Mentor

    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.
    No, because the base will be different in the two scenarios.
    At least if I understand what you are asking.
     
  5. Mar 15, 2017 #4
    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
     
  6. Mar 15, 2017 #5
    Also... Thanks Mark44 for your explanation and efforts.
     
  7. Mar 16, 2017 #6

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    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.
     
  8. Mar 16, 2017 #7

    Mark44

    Staff: Mentor

    The two directions are meaningful in the sense of Future Value and Present Value of investments.
     
  9. Mar 16, 2017 #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) ));
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Calculating Percents: A/B vs. B/A
  1. A -> B (Replies: 3)

  2. Prove that a+b=b+a? (Replies: 5)

  3. Gcd(a,b) = gcd(a,b+a) (Replies: 4)

Loading...