How do calculate a fee from a given percentage Scenario:
I want to buy a share in a company.

*

*Cost per share = 50,000USD


*Number of shares to buy = 0.5


*Transaction fees = 0.2%

Calculations:

*

*Convert fee percentage to a decimal : 0.2 / 100 = 0.002


*Convert decimal fee to amount to subtract from shares : 1 - 0.002 = 0.998


*Calculate shares bought after fees : 0.5 * 0.998 = 0.499

Two part question:

*

*Is the calculation correct?

*Is there a better, simpler way of doing this?

 A: Suppose you want to spend $d$ dollars for shares and that amount should include the commission $c$ (expressed as a fraction, not a percent). Let $s$ be the amount that will go to shares. Then
$$
(1+c)s = d
$$
so
$$
s = \frac{d}{1+c}.
$$
That is not the same as what you calculated, which is $s(1-c)$. But when $c$ is very small (as it is in this case) they are very close. You can check the difference numerically.
A: I could be mistaken, but I don't think transaction fees are calculated in that way.  If you buy two shares, spending $\$100,000$ then you will have to pay an additional $\$200$ in transaction fees.
Therefore, the fraction of outlay that goes toward the transaction fee is
$$\frac{200}{100200} ~\text{rather than}~ \frac{200}{100000}.$$
The natural question is, since my proposed interpretation leads to less profit for the bank/brokerage house, why would they accept such an interpretation?  Answer : because the math is easier for their bookkeepers to understand.
Actually, I could be mistaken; I simply suspect that my interpretation is how the calculations are actually done.
