The most accurate way to measure the masses of celestial objects is to look at their gravitational interactions. In our own Milky Way, the motions of gas clouds and stars can be used to measure the galaxy's mass. This measurement is another application of Kepler's third law, which relates the orbital period and distance of an object from a system's center of mass, and the mass of the system. Isaac Newton showed that the motion of an orbiting object is controlled only by the mass of the system that lies within the object's orbit. In the case of the Solar System, this is obvious because the Sun lies within the orbits of all the planets and so controls the motions. In the case of the galaxy, the Sun's orbital period is controlled only by the portion of the galaxy that lies within the orbit of the Sun. It turns out that the stars exterior to the Sun's orbit do not affect its orbit. The Sun in effect does not "feel" the outer regions of the galaxy. If you could travel toward the center of the Earth, the amount of material between you and the center would decrease. As a result, the gravity force on you would get smaller and you would weigh less. At the center of the Earth — with no material between you and the center — you would be weightless!
Astronomers can use the Sun's orbital motion to calculate the mass of the galaxy within a radius of 8.5 kpc from the Milky Way's center. The result is about 1011 solar masses, or 100 billion times the mass of the Sun. By using information from radio and optical surveys, we can plot the average circular velocity of material at a variety of different distances from the galactic center. A plot of these velocities as a function of distance is called a rotation curve. As anticipated by Newton, there is no net rotation at the center. The fast rotation speed within the inner kiloparsec is due to the gravity of the high density of stars in the galactic bulge. Then it levels off at a value just over 200 km/s out to the distance of the Sun from the center. What happens beyond the position of the Sun is unexpected and extremely interesting. The rotation curve continues to be roughly flat with no decline in orbital speed out to the most distant regions that can be measured.
This result is actually quite surprising. We expect the rotation of the galaxy to diminish once we are beyond the bulk of the material in the disk. A spiral galaxy does not have a sharp edge, rather the clouds of gas and stars get sparser and sparser until they fade off into the darkness of space, and we expect the rotation curve to reflect this falling off in visible matter but showing decreasing orbital velocity at the greatest distances. Astronomers define 15 kpc as the radius of the galactic disk because that distance encompasses about 90% of the mass of the disk. Consequently, we expect the orbital speed of the disk to decline beyond that radius, as defined by Kepler's law. Such a decline is seen in the Solar System — beyond the edge of the Sun, which includes almost all the mass in the Solar System, the orbital speeds of the planets get smaller. In the Milky Way Galaxy, we can find a few wisps of gas and groups of stars all the way out to 20 kpc with no decrease in orbital speed! In fact, the speeds increase slightly! The outermost regions of the disk are moving twice as fast as they should if the visible material of the galaxy represents the entire mass.
These orbital velocities paint an odd picture of the mass of our galaxy, and imply that there is more to our galaxy than meets the eye, telescope, or radio dish! A simple application of Kepler's law indicates a total mass of 1011 solar masses within the orbit of the Sun. This area has a radius of 8.5 kpc from the galactic center. The continued rapid motions at the visible edge of the disk yield a sum of 2 × 1011 solar masses out to a distance of 15 kpc. Beyond this radius clouds of gas and stars are so dim that it is difficult to measure their motions, however, there are a few stars in the halo with distances measured out to 40 kpc. The speeds of these stars give a measure of the mass of the galaxy on the largest scales. The best measure of the total mass of the galaxy out to this distance is about 5 × 1011 solar masses.
Based on these measurements and careful census of all visible matter, it is now believed that our galaxy (and every other galaxy) consists of visible stars, gas and dust that is embedded in a sphere of material that can't be detected accept through it's gravitational pull. This material, called dark matter, was first detected in spiral galaxies in the 1970s, and today is known to make up 22% of the universe's mass-energy distribution. Luminous matter is another 4% of the universe, and a mysterious component called dark energy makes up the remainder. This intriguing situation is discussed in more detail in the articles on cosmology