You enter a Sell Transaction for 50 shares $100 and enter the cost of those 50 shares of $50. So you will have a taxable gain of $50. You will have 50 shares remaining still at a cost of $1 each. It goes by the actual shares sold.
If you had the shares for 1 year or longer it is a Long Term Capital Gain and taxed at a lower rate. If you sold them less than a year it is a Short Term sake and taxed at your ordinary income rate.