Calculating rate of change of accelerometer values

rate of change as it implies the use of time or 2 points in time like a line slope. Adding all the values does nothing.

rate = (y2-y1)/(x2-x1)