Artificial intelligent assistant

Algorithm for finding fee coverage total Is there a mathematical concept involving prediction of a resulting value from a set equation? Here is the situation. A payment processor charges 2.9% + $.30 per credit card transaction. A non-profit wants to allow donors to cover this fee. The non-profit needs to show their donor what the fee will be on their donation of x dollars. In this situation the non-profit can't simply say the fee is = (x * .029) +.30 because the payment processor will charge the processing fee on the the total of the donation. Each time you add the fee to the donation the fee increases. I'm sure this is a know mathematical concept, I just don't know what the name for this is or how to approach solving it. Thanks

If I understand the problem correctly, you want to be able to tell the donor what her donation $d$ should be so that the non-profit will retain an amount $r$. We have $$r=d-0.029d-0.30\tag{1}$$ and want to solve for $d$. We have $r+0.30=0.971d$, and therefore $$d=\frac{r+0.30}{0.971}.$$ After the computation, one might want to do some rounding.

If you want to tell the donor what the fee will be for a net retained amount $r$, calculate $d-r$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4744cf9733ccf0a93e4e6522434fadfb