Determining common difference