Calculate gain slope