For example Paypal has a fees of 2.5%+.25
If someone send me 5$ i'll recieve
5-((5*2.5/100)+0.25) = 4.625
but how do i convert the recieved money 4.625 back to 5
i tried 4.625*102.5/100 +.25=4.99 but i want an exact value
how can that be possible?
Printable View
For example Paypal has a fees of 2.5%+.25
If someone send me 5$ i'll recieve
5-((5*2.5/100)+0.25) = 4.625
but how do i convert the recieved money 4.625 back to 5
i tried 4.625*102.5/100 +.25=4.99 but i want an exact value
how can that be possible?
Well you could start with the fact that your math is wrong.
let val received = x and original val = y:
x = y - 0.025y - 0.25
x = 0.975y - 0.25
x + 0.25 = 0.975y
y = (x + 0.25) / 0.975 --> which is not the same as x * 102.5 / 100 + 0.25
Plug x = 4.625 into that and you'll get exactly 5.
If you call F the final amount you get (4.625) and A the initial 5$ they send you, you have:Quote:
Originally Posted by Orbit__
F = A - (2.5 A / 100 + 0.25) = A - (0.025 A + 0.25)
So now you invert the equation:
F = A - 0.025 A - 0.25 = (1 - 0.025)A - 0.25 = 0.975A - 0.25
and
A = (F + 0.25) / 0.975 = (4.625 + 0.25) / 0.975 = 4.875 / 0.975 = 5