Finding a number that equals another number that references it Apologies in advance if I have not formatted this problem correctly.
Context: I need to find a way to calculate a number that will equal a service fee applied to a product, taking into account the service fee will also be applied to this number.
The system is sort of a middle man between a client and supplier. Currently the the supplier takes the cost of the service charge. We need to be able to allow the client to take this charge. And to do that it it needs to be added as a line item on the invoice, the problem is the service charge will be applied to the line item also as it is calculated using the total transaction value. So in the case above a £2 line item could be added to offset the original service charge, but the 2% would also be applied leaving that (£0.04) unaccounted for.
Example:
The cost of a product is £100, the an service fee would be (2%) £2.
In this case the number couldn't be £2 because a 2% fee would also be applied to the £2 leaving £0.04.
When I first looked at this problem I originally thought the value could be:
((Cost of Product) * 0.02) + ((Cost of Product) * 0.02) * 0.02)
But this is wrong also as there is still a small amount remaining.
Is there an easy way to calculate what the value should be?
 A: You want to make the client pay some extra price as line item to account for the service charge which the supplier had to pay.
But your problem is that, when you add line item having price say $T$ such that $T= \frac{2}{100} P$ , the supplier still had to pay the service charge on line item (equal to $2\%$ of $T$) which is unaccounted. $\tag{*} \label{*}$ So what you decide to do is that, you again add that unaccounted amount in the line item so that your new price of line item is $T'$ such that $$T'= T+ \frac{2}{100} T=  \frac{2}{100} P+\frac{2}{100}\frac{2}{100}P$$
Yet again, you face the same problem but the unaccounted amount is now lesser. So you do this infinite times to reduce the unaccounted amount to zero. So your final price of line item should be $T_{final}= \frac{2}{100} P+\frac{2}{100}\frac{2}{100}P +....= 0.02 P+(0.02)^2 P +(0.02)^3 P+...=\frac{0.02 P}{1-0.02}=\frac{P}{49}$.
This $T_{final}$ is the price of line item, i.e the number you were referring to in the question. The total price in the invoice will be $P+ T_{final} =P+\frac{P}{49}=+\frac{P}{0.98}$
$\ref{*}$ From here you can simply add the price of line item in that service charge with the following equation as done by @TonyK in his answer, instead of doing that infinite sum.
$T=\frac{2}{100}(P+T)$
Solving for $T$ you'll directly get $T =\frac{P}{49}$
A: Given the supplier's base price $P$, you want to know the total price $T$ so that after the middle man takes 2% of $T$, what's left is $P$. (Right?)
So we have $T-0.02T=P$, which you can rearrange as $T=P/0.98$.
And if $P=£200$, then $T=£204.08$ to the nearest penny. The middle man takes 2% of this, which is $£4.08$ to the nearest penny. This leaves $P=£200$ for the supplier, as desired.
