The escape speed associated with any celestial body, such as a star, a planet, a dwarf planet, or a moon, is the speed at which an object, starting from the body surface, would have to travel to be able to escape the body's gravity. An object in motion has escaped the gravity of a celestial body if the body cannot cause the object to fall back toward it or to remain in a closed orbit around it.
Escape speed is a scalar, not a vector. An object in motion with respect to a celestial body need not be moving directly away from that body in order to escape it.
When an object is traveling exactly at escape speed, it is in a parabolic orbit with the body at the focus of the parabola. A parabolic path is open; hence an object following such a path will never return to the body.
An object traveling at a speed slower than the escape speed normally moves in an ellipse, which is a closed path. So long as that path does not intersect the body surface, the path is an orbit.
An object traveling faster than escape speed is following a hyperbolic orbit, which is also open. The object will always be traveling faster than a minimum speed even after infinite time.
Escape speed depends on two properties of the body to be escaped from: its mass and its radius. A body has one escape speed from its surface and a different escape speed from any altitude above that surface. The classical "escape speed" of any body is the escape speed from its surface. Once an object is in a closed orbit, the escape speed required to break out of orbit is considerably less than the escape speed from the surface.
The formula for escape speed, depending on body mass and radius, is:
The formula that depends on surface gravity is simpler:
where g = surface gravity.