Density of the Sun

The image below represents the Sun's density gradient, which shows how the density changes with the radius. The ground we stand on should have a density between 2 to 3 $g/cm^{3}$. That should put you just above the water point on the vertical axis. The corresponding radius is then about 0.45 of the solar radius.

Note that the vertical axis is in a logarithmic scale.

More links to this data and its source in this answer.

enter image description here


As @KyleKanos point out, "the answer is a google search away", but it's not quite as simple as he suggests. The mean density doesn't answer your question (the mean density turns out to be about 1.4 times the density of water by the way).

An ill-defined idea in your question is the "surface" of the sun. Where is the "surface" of the sun given that none of the sun is solid? For sake of argument let's define the surface as being somewhere in the photosphere, and call this "one solar radius".

The quick answer to your question is that in the radiative zone (which goes from 0.25 solar radii out to about 0.7 solar radii) the density varies from about 20 times the density of water (much denser than the ground we are standing on, unless you happen to be standing on a piece of ground made of solid osmium) at the inner edge of the radiative zone to 0.2 times the density of water at the outer edge of the radiative zone. So somewhere between 0.25 and 0.7 solar radii the density is the same as the Earth's crust. To know more precisely I think you'd have to delve deeper into a book on stellar astrophysics and look at the detailed models of the interior of the sun.