The speed v is defined as the magnitude of the velocity v, that is the derivative of the position r with respect to time:
If s is the length of the path traveled until time t, the speed equals the time derivative of s:
In the special case where the velocity is constant (that is, constant speed in a straight line) this can be simplified to v=s/t. The average speed over a finite time interval is the total distance traveled divided by the time duration.
Expressed in graphical language, the slope of a tangent line of a distance-time graph is the instantaneous speed, and the slope of a chordline of distance-time graph is the average speed over the time interval between the ends of the chord.