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 in-between. 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
gR = M / R2,
where M and R are the mass and radius of the planet, we simply replace M, the total mass, by mr, the mass lying inside the central sphere, and R, the radius of the planet, by r, the radius of the central sphere, and gR, the surface gravity, by gr, the gravitational effect of the central sphere. The above equation then becomes
gr = mr / r2.
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 left-hand part of the spherical shell has a greater volume and mass than the right-hand part, which should cause it to exert a greater force, the left-hand 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 left-hand part exactly compensates for its greater mass, and it and the right-hand 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,
gr = mr / r2.
To see how the gravity of a planet would vary if it were absolutely uniform and uncompressed we define dr 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,
dr (is proportional to) mr (divided by) r3,
or rearranging the terms to solve for the central mass,
mr (is proportional to) dr (times) r3.
We substitute this value for mr in the equation for gr to obtain
gr = (dr (times) r3) / r2,
or canceling the extra r's,
gr = dr 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
pr = (3 / 8 π G) gR2 (1 - (r/R)2),
which has the same g2 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) gR2 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 Non-Uniform 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
gcore-mantle boundary = (0.33 M) / (0.55 R)2 = 1.09 M / R2 = 1.09 gR.
In other words, at the core-mantle boundary, instead of the gravity being only 55% of that at the surface (which is what it would be using the straight-line 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 = g2 (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.
Now, if everything were as simple and easy as possible, the
g2 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 metal-rich cores and less-dense 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 core-mantle 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, low-mass core, and although at its core-mantle 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
gR) 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):