Thus, a swinging pendulum has its greatest kinetic energy and least potential energy in the vertical position, in which its speed is greatest and its height least; it has its least kinetic energy and greatest potential energy at the extremities of its swing, in which its speed is zero and its height is greatest.