Home > Back-end >  How do I reverse a successive percentage calculation?
How do I reverse a successive percentage calculation?

Time:05-28

So I have a formula for working out net earnings after "fees", essentially it is gross earning minus a percentage in commission as well as minus a percentage in tax from the percentage in commission amount which then gives net earnings. So if gross was 100 and both commission and tax were 20%, it would be 100 minus 20% which would give 20, and then 20% of that 20 in tax which would be 4, and then both that 4 and 20 minus 100 giving net of 76. My issue is now trying to reverse this by only knowing net and wanting to know what the initial gross was before those two percentage decreases. So the original formula for the above example if I'm getting it right is 0.2a 0.2^2a-a=b, how do I reverse this now to find out a as I only know b?

CodePudding user response:

If

net = gross - (gross * p1)  - p1 * gross * p2
    = gross * (1 - p1 - p1*p2)

Then

gross = net / (1 - p1 - p2*p1))

So in your example:

gross = 76 / (1 - 0.2 - 0.2*0.2)
      = 76 / (0.8 - 0.04)
      = 76 / (0.76)
      = 100
  • Related