Being a fairly good math student in high school, this is humbling. But my knowledge about graphs and formulas has greatly diminished since then.
I'm trying to write a formula that calculates a percentage, depending on the total amount. My base is $15\%$ of $100$. Basically the percentage needs to go up as the total goes down, and vice versa. So some examples:
10000 => 5% (500) 1000 => 7% (70) 300 => 10% (30) 100 => 15% (15) 80 => 20% (16) 40 => 30% (12) 20 => 40% (8) 5 => 60% (3)
There would also be a limit I think, in that $0\%$ must not be possible. The upper boundary is infinite in theory, but in practice more likely to be around $100000$.
Without the deviation, the formula would be simple:
$ y = 100/x*15 $
But as far as the deviation goes, I could use some help. The numbers are just an example, I'll probably tinker with the variables a bit to get the exact formula.