I am trying to calculate how many shares to issue to a new shareholder so that they will have a specified percentage after the new shares are issued.
I'm not sure if I have explained this clearly so here is an example.
400 (existing) + 100 (new) = 500 (total) because 100 (new) = 20% of 500 (total)
400 (existing) + 400 (new) = 800 (total) because 400 (new) = 50% of 800 (total)
so given the below
E (existing) + X (new) = Y (total) because X (new) = Q% of Y (total)
If I know E and Q how can I calculate X, and thus Y (which is obviously E+X).
Thanks for any assistance!
You are given the relations that $X=Y\cdot Q$ and that $E+X=Y$, and are given the input values of $E$ and $Q$.
So, you have: $$\begin{align}E + Y\cdot Q & = Y & (\text{from definitions})\\ E & =Y - Y\cdot Q & (\text{from subtracting}~ Y\cdot Q)\\ E & = Y\cdot (1-Q) & (\text{by combining like terms})\\ \frac{E}{1-Q}&=Y & (\text{by dividing by}~1-Q)\end{align}$$ (where $Q$ is in decimal notation, I.e. $20\%=.2$). Similarly $X=Y\cdot Q = \frac{E\cdot Q}{1-Q}$
In your examples above, with input $E=400$ and $Q=.2$ (i.e. $Q=\%20$) you have $X = \frac{E\cdot Q}{1-Q} = \frac{400\cdot .2}{.8} = 400\cdot\frac{1}{4} = 100$ and $Y = \frac{400}{1-.2} = \frac{400\cdot 5}{4} = 500$