Sorry for asking this foolish question.
Here is the data i have.
I purchased the product as $5 and additional fee is 2%.
So Here is the total dollor
$total = 5 + (5*2/100) = 5.1 total dollor i have.
But now i want to revert back to original price
in this case i have the data as only
total amount
$5.1 and 2% fee.
How can i revert back to $5 based on the above data.
Thanks
It appears from your calculation that the additional fee is $2$ percent of the price, not $\$2$. That means that if the base price is $p$, the total cost $t$ is $t=p+0.02p=1.02p$. Thus, $p=\frac{t}{1.02}$.
In your example, for instance, this leads to the calculation
$$p=\frac{5.1}{1.02}=5\;,$$
as it should.