Calculating Gain Or Loss