HOW DO YOU CALCULATE CAPITAL GAIN