Escape velocity
The escape velocity of an object in motion about a celestial body (planet, asteroid, star, etc.) is the velocity at which the object's kinetic energy plus its potential energy exceeds the gravitational potential energy of the body. At this velocity or above, the object's motion can ultimately proceed to an infinite distance without its path being reversed by the body's gravitational influence. Although the object's path may be strongly curved when the two are in close proximity, the path of a body travelling at escape velocity is always an open curve.
An object moving at a celestial body's escape velocity will eventually be free of the celestial body's gravity.
An object approaching an airless celestial body from an effectively infinite initial distance (for which the radius of the celestial body is negligible in comparison) can be gravitationally accelerated to the escape velocity of the body before reaching its surface.
Mathematics
If the celestial body's mass is much greater than that of the object in motion, and both the object and celestial body can be approximated as spherical, then the escape velocity of a celestial body is:
<math>v_{esc} = \sqrt{2 G M \over r}</math>
where:
vesc is the escape velocity at distance r from the center of mass
G is the universal gravitational constant
M is the mass of the larger body
This value is defined relative to the current radius of motion, regardless of the celestial body's size.
The escape velocity at a given radius is <math>\sqrt{2}</math> times the orbital velocity of a gravitationally bound circular orbit with that radius.
It is often convenient to define the surface escape velocity of a celestial body. This is the escape velocity at its surface.
<math>v_{s}= \sqrt{2 G M \over R}</math>
where
vs is the surface escape velocity
R is the radius of the celestial body
Examples
The average radius of the planet Mars is <math>R = 3370 km</math> and its mass is <math>M = 6.42 \cdot 10^{23} kg</math>.
Thus, using the formula given above, its surface escape velocity is <math>v_{s} = 5040 {m \over s}</math>.
The mass of the planet Earth is <math>M = 5.98 \cdot 10^{24} kg</math>, and its moon orbits at an average distance of <math>r = 3.84 \cdot 10^{5} km</math>. The escape velocity at this average distance is <math>v_{esc} = 1440 {m \over s}</math>. This is only 420 <math>m \over s</math> more than the orbital velocity of a circular orbit with that radius.