My employer offers an Employee Stock Purchase Program (ESPP). Long story short, worst case scenario is that they will purchase stock on my behalf at a 15% discount and then I will immediately sell it. I am confused as to why my gain is 17.65% as opposed to 15%. Where does the number 17.65% come from? It is not intuitive to me. Example calculation:
On purchase day stock price is 10 USD. I get to buy it using my discount so, I buy it at (.85*10) = 8.50 USD I then immediately sell it for 10 USD.
So my gain is (10-8.50)/8.50 = 17.65%
The $15\%$ discount is multiplied by the market price to give your purchase price. The gain is calculated as a percentage of the discount price, which is lower. As the absolute discount is the same, the gain on sale must be a higher percentage.
The effect is general and gets larger as the discount percentage increases. If you get a $50\%$ discount you would buy the stock at $5$. The immediate profit would then be $100\%$ because you can sell it at $10$. If your discount is $x$, you buy the stock for $1-x$ and sell it for $1$, so the profit is $\frac x{1-x} \gt x$ because the denominator is less than $1$.