The densities of the planets tell us something about what they are made of. The Terrestrial planets, which have densities half again to twice those of ordinary rocks, must be made of something very dense, whereas the Jovian planets and Pluto, which have densities comparable to or even less than that of water, must be made of low density materials. However, the densities are affected by the weight that squeezes the central parts of the planets, and to know just how dense the materials within a planet really are we have to take into account the weight compressing them. This is usually expressed in terms of the weight lying above each square foot of the planets' interiors, which is, according to the Law of Hydrostatic Equilibrium, the same as their internal pressure. Near the surface the weight of the materials lying above you is relatively small, but as you go downwards more and more material lies above you and the weight compressing the local materials gets larger and larger, so the materials are more and more compressed by that weight.
To a first approximation, as long as we don't need to know the actual internal pressures but only the relative values for different planets, we can estimate the compressive forces by taking the weight the planet would have if everything inside it were subject to the same force as its surface gravity, and dividing that by its surface area:
pressure (is proportional to) the total weight of the planet / its surface area,
or using symbols for the quantities, P (is proportional to) M g / R^{2},
where M represents the planet's mass, g its surface gravity and R its radius. But the surface gravity g is proportional to M / R^{2}, so this equation can be replaced by
P = g^{2},
where (is proportional to) has been replaced by an equals sign because we are going to compare everything to the Earth, making the value for the Earth the unit of measurement.
In other words, as far as the above approximation is correct, the pressure inside a planet compared to that inside the Earth is simply the square of the planet's surface gravity, compared to that of the Earth.
Gravitational Fields Inside Planets
In the simple calculation above the structure of the planet is ignored, and whether the local gravity differs from the surface gravity at various depths is similarly ignored. This is all right, since we are not calculating the actual pressures but only relative values, any errors in the calculations will cancel out providing they are the same for both the Earth and the planet we are comparing to the Earth. But in reality, there must be some differences between the various planets, so we need to understand how these differences affect detailed calculations, in order to gauge how accurate the simple estimate above might be.
To see how this works, refer to Figure 1. This shows how gravity varies with distance from the center of a planet for various simplifying assumptions, and for the best guesses as to the actual structures of the four Terrestrial planets. The dots represent the 1 / r^{2} relationship which gravity follows on the outside of a planet, according to Newton's Law of Universal Gravitation. The vertical line labeled (at the bottom) R represents the surface of the planet. The horizontal line labeled (on the left) g_{R} represents the surface gravity of the planet. The black diagonal line represents the way local gravity changes as you go from the surface to the center in a planet which is absolutely uniform in structure, and is not compressed by its own weight to any significant extent (the reason for the way in which gravity changes for this and the other colored lines is explained in detail below). The broken red line represents the approximate way in which gravity changes inside the Earth and Venus, the broken blue line the way in which it changes inside Mercury, and the broken green line the way in which it changes inside Mars.
Figure 1: How gravity varies inside a planet.
Gravitational force is shown increasing upwards, with the distance from the center of the planet increasing to the right. In a uniform planet gravity decreases uniformly as you move inwards. In a real planet, depending upon its structure, gravity still tends to decrease as you move toward the center, but nonuniformly.
In the calculation above, using M g to represent the total weight of the material inside the planet is equivalent to presuming that the horizontal line labeled g_{R} is the way in which gravity varies inside the planet  in other words, that the gravity does not vary, but is everywhere the same as at the surface. However, this is not possible, as you can see from the four more or less diagonal lines, all of which have two points in common. All of them have a gravity equal to the surface gravity at the surface of the planet, and all of them have a gravity equal to zero at the center of the planet.
To understand the reason for this, consider the way gravity works when you are at the surface of a planet. Every part of the planet is pulling on you with a force given by Newton's Law of Gravitation, in the direction from you to that part of the planet. Some parts are off to one side of you and pull you to that side and downwards, while other parts are off to the other side of you and pull you to that side and downwards. Some parts are close to you and pull on you relatively forcefully, while other parts are further away from you and pull on you with less force. Adding up the combined effect of all the forces is very complicated  in fact Newton had to invent what we call integral calculus in order to find out what the combined effect was. However, the results turn out to be very simple, so we can discuss them in some detail without having to go into the calculations required to get those results.
First, consider the sideways component of the forces. Since the Earth is a relatively symmetrical body, each part of the Earth which is on one side of you, pulling you to that side with some particular force, has a corresponding part on the other side of you which is pulling you to the other side with an exactly equal force. As a result, all the sideways forces exactly cancel each other out and we can ignore them. Only the downward force needs to be calculated.
As just mentioned it requires integral calculus to figure out how the force exerted by closer parts of the Earth which are pulling on you harder, and the force exerted by more distant parts which are pulling on you less hard add up, but the result is surprisingly (and to a mathematician, beautifully) simple. You simply treat the Earth as though all of it were in its center, and use the standard inverse square law for gravity:
gravity due to an object at distance r (is proportional to) its mass divided by the square of its distance,
or, treating everything inside the planet as though it is in the center of the planet,
surface gravity (is proportional to) the total mass of the planet divided by the square of its radius
or, replacing the quantities involved by appropriate symbols,
g_{R} = M / R^{2}.
Now consider the situation in the center of the planet. Since you are in the center there is no downward force, since there is no "down". Instead, all of the forces acting on you are "sideways" forces, and every force exerted by a part of the planet on one side of you is exactly canceled by the force created by the corresponding part of the planet on the other side of you, resulting in no net force of gravity acting on you. In other words, in the center of a planet you would be "weightless". You wouldn't just float around of course, because you would be buried under thousands of miles of whatever materials the planet is made of, and squashed by the incredible forces produced by the weight of those materials. But your own weight, and that of other things near you would be zero, as shown by the four nearly diagonal "curves" in Figure 1.
Finally, consider the situation shown in Figure 2, in which you are neither at the surface nor the center, but somewhere inbetween. To help visualize what is going on the planet is divided into two parts: the sphere which lies between you and the center, and the spherical shell which lies between you and the surface. The spherical shell is also divided into two parts, a larger part which lies to the left in the diagram, and is more or less in the direction of the center of the planet, and a smaller part which lies to the right in the diagram, and is more or less in the direction away from the center of the planet.
Figure 2: Diagram of forces inside a planet.The central part of the planet pulls the observer toward the center, but one side of the outer part of the planet pulls the observer one way, while the other side of the outer part of the planet pulls the observer the other way.
We already know how to handle the gravitational force exerted by the central part of the planet. We simply treat it as if all of its mass was in the center of the planet and apply the standard inverse square law of gravity. Since, at the surface of the planet the gravity is given by
g_{R} = M / R^{2},
where M and R are the mass and radius of the planet, we simply replace M, the total mass, by m_{r}, the mass lying inside the central sphere, and R, the radius of the planet, by r, the radius of the central sphere, and g_{R}, the surface gravity, by g_{r}, the gravitational effect of the central sphere. The above equation then becomes
g_{r} = m_{r} / r^{2}.
Of course, this result has to be added to whatever effect the spherical shell lying outside your position produces, but rather remarkably, the net gravitational effect of the outer shell is zero. Although, as drawn in Figure 2, the lefthand part of the spherical shell has a greater volume and mass than the righthand part, which should cause it to exert a greater force, the lefthand part is on the average further away from you, which should cause it to exert a lesser force than would otherwise be expected. It requires integral calculus, as already stated, to see how the conflicting effects reduce each other, but the net result is that the greater distance of the lefthand part exactly compensates for its greater mass, and it and the righthand part exert exactly equal and opposite forces, so the net gravitational force of the spherical shell lying "above" you is exactly zero. (Note: This means that in fantastic stories involving a hollow Earth, people would not be able to walk around on the inside of the Earth, held to its inner surface by the gravity produced by the spherical shell that surrounds them. Instead, they would be completely weightless and just float around unless they somehow tethered themselves to the inner "surface" of the hollow shell.)
The Variation of Gravity Inside a Uniform Planet
We are now ready to look at how local gravity varies inside a planet. Since the part of the planet further from the center than we are considering doesn't count, we only need to calculate the effects of the sphere lying between us and the center, which is as stated above,
g_{r} = m_{r} / r^{2}.
To see how the gravity of a planet would vary if it were absolutely uniform and uncompressed we define d_{r} as the average density of the material lying within the central sphere. This density would be equal to the mass of the central sphere divided by its volume, or using the symbols already defined,
d_{r} (is proportional to) m_{r} (divided by) r^{3},
or rearranging the terms to solve for the central mass,
m_{r} (is proportional to) d_{r} (times) r^{3}.
We substitute this value for m_{r} in the equation for g_{r} to obtain
g_{r} = (d_{r} (times) r^{3}) / r^{2},
or canceling the extra r's,
g_{r} = d_{r} r.
In other words, the gravity produced by the part of the planet between a given place and the center is proportional to its average density and its size. This means that if all parts of the planet had an absolutely uniform density, the gravity would increase uniformly from the center to the surface as shown by the straight diagonal line labeled "uniform" in Figure 1. It also means that if planets have similar densities, their surface gravities will be directly proportional to their sizes, larger planets having larger gravities and smaller planets having smaller gravities exactly according to their size.
If you would like to see a more accurate way of calculating the pressure inside a planet, refer to Accurately Calculating Internal Pressures. That page contains a discussion involving integral calculus, but the mathematics is simplified as much as possible, so you don't have to know how to do calculus to follow the argument, and the discussion is reassuring in that it confirms the result of the approximate calculations shown above. As shown on that page, the correct formula for the pressure inside a uniform planet is
p_{r} = (3 / 8 π G) g_{R}^{2} (1  (r/R)^{2}),
which has the same g^{2} relationship derived from the approximation above which assumes uniform gravity inside the planets. As shown on the other page, the pressure at various points inside a planet of uniform density (an object with the same materials throughout, uncompressed by the weight above them, or materials varying in their intrinsic density in a way that exactly compensates for their compression, so that the local density is uniform) is shown by the diagram below, in which the horizontal axis shows the distance from the center of the planet, and the pressure rises from zero at the surface, to (3 / 8 π G) g_{R}^{2} at the center of the planet. Note that near the surface, where the gravity is close to the surface gravity, pressure rises more or less uniformly with depth inside the planet, but as you approach the center, where the net gravitational force drops to zero, the pressure levels off to its maximum value, and the central core has nearly constant pressure.
Figure 3: The pressure inside a uniform planet. Near the surface, where gravity is close to the surface value, the pressure increases uniformly. Near the center, where gravity is close to zero, the pressure increases more slowly.
The Variation of Gravity Inside a NonUniform Planet
But what if a planet is not uniform, but differentiated, as we know the Earth must be, and suspect must be true of all the planets? In that case the central parts of the planet should be denser than the outer regions, which makes the diagonal line representing the gravity inside a uniform planet unrepresentative of the actual planets. What happens then?
You can see what happens by referring to the colored lines for the various Terrestrial planets, as shown in Figure 1. In particular, consider the case of the Earth, whose internal gravitation is shown by the red line. As you move toward the center of the Earth, the part of the mantle that now lies above you no longer contributes to your weight, but the parts of the mantle and core that still lie below you provide a greater than normal contribution, since you are closer to them. If the interior of the planet were the same density as the outer regions, the greater contribution of the inner layers would be swamped by the loss of gravity from the outer layers, because the outer layers have a greater volume (it takes more mass to wrap all around the outside of something than to huddle in the middle). However, since the core of the Earth is much denser than the mantle, it contains an inordinate amount of mass (in fact, about twice as much mass as you might expect, given its volume), and getting closer to the core and its relatively large mass causes a slightly greater increase in gravity than the loss of the gravitational effect of the outer region. As a result, while you are still inside the mantle, moving inwards produces a small net increase in your weight. However, once you are inside the core, since it has a roughly constant density, your weight begins to decrease in almost the same way as it would inside a uniform planet, and drops toward zero as you approach the center of the planet. Note that the diagram uses straight lines to represent the gravitational changes in the mantle and core, but the actual gravitational changes are undoubtedly more complicated.
As an example of how this works out arithmetically, imagine standing at the boundary between the core and mantle of the Earth, which is at the point where the red line in Figure 1 bends downward on either side, 55% of the way from the center to the surface. The mantle lying outside you would have no net gravitational effect on you. Only the core would produce a net gravitational effect. The size of this effect is determined by the mass of the core, which is approximately 33% of the mass of the Earth, and its size, which is approximately 55% of its radius. Inserting these values in the formula for gravity, we obtain
g_{coremantle boundary} = (0.33 M) / (0.55 R)^{2} = 1.09 M / R^{2} = 1.09 g_{R}.
In other words, at the coremantle boundary, instead of the gravity being only 55% of that at the surface (which is what it would be using the straightline relationship for a uniform planet), it is nearly 10% larger than at the surface, or about twice as large as you might otherwise expect. If the core were the same density as the rest of the Earth, its smaller size and mass would give it a smaller local gravity than the whole Earth, but since it is twice as dense as the average density of the Earth, its net gravity is doubled compared to what it would have otherwise been.
The Internal Pressures of the Terrestrial Planets
Now let's apply these principles to the other planets. As described at the beginning of this discussion, if the gravity everywhere inside a planet were the same as at the surface or decreased uniformly from the surface to the center, the pressures at various points inside different planets would be proportional to the squares of their surface gravities, multiplied by some constants, and a function of the position inside the planet:
P = g^{2} (3 / 8 π G) (1  (r/R)^{2}),
As shown in Figure 1, the gravity inside a planet isn't uniform. In some places it may actually be larger than at the surface, but in many places, particularly near the center of the planet, it is much less than the surface gravity, and at the center the local gravity is zero. If you wanted to do detailed calculations of the actual pressures at various places inside a planet, this would produce fatal errors in your results unless you use the integral calculus described on the supplementary page. However, if you are only trying to calculate relative values of the gravity in various places, you can get the correct results, at least to a first approximation, without any knowledge of how the gravity changes inside the planet. All you have to do is assume that for the planets involved, the internal structure is sufficiently similar that any errors in the shape of the gravity curve for one planet are mirrored by similar errors in the shape of the gravity curve for the other planet. And as it happens, all of the Terrestrial planets have fairly similar gravity curves, so you can get an approximately correct idea of their internal pressures just by using the simple relationship between pressure and gravity, and ignoring any complications.
The table below shows how this works, and how well (or badly) it works. On the left we have the names of each of the Terrestrial planets, followed by their surface gravities compared to that of the Earth, and the square of their surface gravities, which according to our approximate derivation, should be approximately equal to their relative internal pressures. The next column shows the actual pressure in the center of each of the planets (shown in Earth atmospheres, or tons per square foot), as taken from careful calculations of the best current estimates of the internal structures of those planets. The last column shows how those actual values compare to the value for the Earth.
Planet  g  g^{2}  Actual Calculated Internal Pressures (in Earth Atmospheres)  Calculated Value Compared to Earth 
Mercury Venus Earth Mars
 .38 .9 1 .38
 .14 .81 1 .14
 400 000 2 900 000 3 600 000 400 000
 .11 .81 1 .11 
Now, if everything were as simple and easy as possible, the g^{2} values in the third column would be the same as the calculated values in the last column. And to a certain extent that is exactly the case, because these four planets have fairly similar structures, with dense metalrich cores and lessdense rocky mantles. In fact, because Venus is thought to have a structure almost identical to that of the Earth, the gravity curve for Venus is thought to be nearly identical to that of the Earth, so the two values, whether "simply" or "accurately" calculated, are identical (the fact that the Earth's values are identical is meaningless, since we are using it as the unit of comparison). However, for Mercury and Mars the "accurate" values are a little lower than the "simple" values, so it is worth discussing the reason for this, and examining Figure 1 one more time.
Note that the gravity curves for Mercury (in blue) and Mars (in green) are quite different from those for the Earth and Venus (in red). Mercury has an unusually large metallic core, which is thought to make up about 70 to 80% of the radius, and 60 to 70% of the mass, of the planet, so the peak gravity, which occurs at the coremantle boundary, is further out than in the Earth. As a result the curve for Mercury, although looking similar to that for the Earth, lies well below the curve for the Earth throughout much of the interior of the two planets. This means that the gravity inside Mercury is, on the average, lower compared to its surface gravity than the gravity inside the Earth is, compared to its surface gravity. As a result, merely squaring the surface gravity gives too large a result for Mercury (about 20% too large, as you can see from the table).
On the other hand, Mars has an unusually small, lowmass core, and although at its coremantle boundary the gravity is larger than for a uniform planet, it is still considerably less than at the surface, which makes its average internal gravity less than you would expect if it were just a smaller version of the Earth, making the "simple" calculation just about as accurate (and inaccurate) as the one for Mercury.
Please note that although the simple calculation (squaring g_{R}) is a bit "off" for Mercury and Mars, the error involved is very small compared to the huge difference between the actual values and the values for the Earth and Venus. The Earth and Venus have large surface gravities, large internal gravities, and large internal pressures, while Mercury and Mars have small surface gravities, small internal gravities, and small internal pressures. And as far as the large difference between Venus and the Earth on the one hand and Mars and Mercury on the other hand has any effect on their structures, even the simple calculations give an approximate indication of what is going on. As a result, we would probably be perfectly justified in using a similar approach to estimating the internal gravities and pressures of other objects, as well. As far as they are similar to the Terrestrial planets, the results of the calculations would be expected to be more accurate, but if they were different from the Terrestrial planets, the results of the calculations would be expected to be less accurate; but in any event, the results should be in the right ball park, so to speak.
The Internal Pressures of the Jovian Planets and Pluto
With this in mind, let's see what we get for the internal pressures of the Jovian planets using estimates based on the squares of their surface gravities (unfortunately, accurate estimates of the internal structures of these planets are harder to obtain, but I have listed the best values that I could find, or estimate from other available data):
Planet
 g
 g^{2}  Actual Calculated Internal Pressures (in Earth Atmospheres)
 Ratio of Pressure to Earth's Internal Pressure
 Earth Jupiter Saturn Uranus Neptune Pluto
 1 2.52 1.06 .92 1.19 0.62
 1 6.4 1.13 .85 1.42 .0038
 3 600 000 (50 to 100) 000 000 (5 to 8) 000 000? (4 to 5.5) 000 000? (5.5 to 7) 000 000? (9 to 11) 000?
 1 15 to 30 1.5 to 2.5? 1.1 to 1.5? 1.5 to 2? .0025 to .0030?

Note that the pressures inside the Jovian planets are considerably greater than those that would be expected on the basis of the "uniform" planet calculations. According to detailed calculations these planets must be considerably compressed in their centers, so that as you go inwards their gravities are much larger in comparison to their surface gravities than for the Terrestrial planets. Figure 4, below, shows approximate estimates of the internal gravities for Jupiter and Saturn, compared to those for the Terrestrial planets (in order to make the graph reasonably small it has been vertically compressed by a factor of two compared to Figure 1). As you can see, Jupiter and Saturn are thought to be very compressed in the center, making their central gravities much higher at various internal positions compared to the corresponding values for the Terrestrial planets. This makes both their internal gravities and internal pressures considerably higher than we might otherwise expect. For Jupiter the gravity and pressure are many times greater than for an uncompressed planet, but for Saturn, since its gravity and compression are less, the differences are not as great. Uranus and Neptune, although not shown in the graph, would be still less compressed, but still considerably more compressed than the Terrestrial planets.
Figure 4: Gravities inside the Jovian planets are much greater than inside the Terrestrial planets.(Note: The gravity inside Jupiter cannot be greater than the 1/r^{2} law shown by the dots, but the straightline approximation to its internal gravity is only an approximation, so the actual gravity must be lower than shown in the outer layers.)
(Topics still to be covered 
(How the internal pressures can be used to estimate the structures of the planets
(How the estimates can be used to iterate better estimates
