Calculate commission percentage based on input amount

29 Views Asked by At

I want to create a function that returns a commission percentage (y) bases on an input amount (x). My math is a bit rusty (to say the least), but I recall that this should be a logarithmic regression that approaches a certain value (and never surpasses it).

The data is as follows:

  • x1: 500, f(x1): 5%
  • x2: 2500, f(x2): 3%
  • x3: 10000, f(x3) : 1%
  • inf, f(inf) : ≈ 0.5 %

I apologise for being a complete newb in math, but I hope this makes sense and someone can help me out!