How can I calculate total return of stock with partial sale?
If you just want to know total return, either as dollars or a percentage, just add up the total amount spent on buys and compare this to current value plus money received on sales. In this case, you spent (310 x $3.15 + $19.95) + (277 x $3.54 + $19.95). So your total investment is ... calculator please ... $1996.98. You received 200 x $4.75 on the sale minus the $19.95 = $930.05. The present value of your remaining shares is 387 x $6.06 = $2345.22. So you have realized plus unrealized value of $2345.22 + $930.05 = $3275.27. Assuming I didn't mix up numbers or make an arithmetic mistake, your dollar gain is $3275.27 - $1996.98 = $1278.29, which comes to 1278.29 / 1996.98 = 64%. If you want to know percentage gain as an annual rate, we'd have to know buy and sell dates, and with multiple buys and sells the calculation gets messier.
Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
How can I calculate total return of stock with partial sale?

### Response:
If you just want to know total return, either as dollars or a percentage, just add up the total amount spent on buys and compare this to current value plus money received on sales. In this case, you spent (310 x $3.15 + $19.95) + (277 x $3.54 + $19.95). So your total investment is ... calculator please ... $1996.98. You received 200 x $4.75 on the sale minus the $19.95 = $930.05. The present value of your remaining shares is 387 x $6.06 = $2345.22. So you have realized plus unrealized value of $2345.22 + $930.05 = $3275.27. Assuming I didn't mix up numbers or make an arithmetic mistake, your dollar gain is $3275.27 - $1996.98 = $1278.29, which comes to 1278.29 / 1996.98 = 64%. If you want to know percentage gain as an annual rate, we'd have to know buy and sell dates, and with multiple buys and sells the calculation gets messier.