First described by Edouard Roche in 1848, the Roche Limit is the closest a celestial body can orbit around a planet without being pulled apart by the planet's tidal forces. The more dense a body, the closer it can get. Consequently, the larger and denser the planet, the farther away the body must remain. The equation for determining the Roche Limit is as follows:

Lr = 2.423 * Rp * (Dp / Dm)1/3

Lr = Roche Limit, measured in planet radii
Rp = radius of the planet from its center
Dp = density of the planet
Dm = density of the body

Thus, if a planet and its moon have the same density, the Roche Limit would be 2.423 planet radii.

An example of an object dropping below the Roche Limit is the Shoemaker-Levy 9 comet, which was torn into pieces and eventually slammed into Jupiter in 1992. The rings of the gas giants are the remnants of things that also fell below the Roche Limit. The Roche Limits for the gas giants are as follows (assuming average moon density):

Jupiter   175,000 km
Saturn    147,000 km
Uranus     62,000 km
Neptune    59,000 km

The Roche Limit doesn't apply only to gas giants. It applies to any large celestial bodies, including the Earth, which raises the question... how close is our moon to the Roche Limit? The answer is... not very close. The Roche Limit for the Earth and Luna is about 4 Earth radii. But Luna is more orbiting at more than 60 radii, and moving farther away all the time.