Share your insights or perspective on the financial matter presented in the input.

How to split stock earnings?
Let's suppose your friend gave your $100 and you invested all of it (plus your own money, $500) into one stock. Therefore, the total investment becomes $100 + $500 = $600. After few months, when you want to sell the stock or give back the money to your friend, check the percentage of profit/loss. So, let's assume you get 10% return on total investment of $600.  Now, you have two choices. Either you exit the stock entirely, OR you just sell his portion. If you want to exit, sell everything and go home with $600 + 10% of 600 = $660. Out of $660, give you friend his initial capital + 10% of initial capital. Therefore, your friend will get $100 + 10% of $100 = $110. If you choose the later, to sell his portion, then you'll need to work everything opposite. Take his initial capital and add 10% of initial capital to it; which is $100 + 10% of $100 = $110. Sell the stocks that would be worth equivalent to that money and that's it. Similarly, you can apply the same logic if you broke his $100 into parts. Do the maths.