Results 1 to 3 of 3

Thread: [RESOLVED] Calculate fees

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2008
    Posts
    62

    Resolved [RESOLVED] Calculate fees

    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?

  2. #2
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: Calculate fees

    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.

  3. #3
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Calculate fees

    Quote Originally Posted by Orbit__
    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?
    If you call F the final amount you get (4.625) and A the initial 5$ they send you, you have:

    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
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width