The Milky Way is the galaxy in which the Earth resides. Part of it is visible on a clear night from Earth, as a thick band of stars stretching across the sky. We can see thousands of these stars with the naked eye, and many more in a telescope. But how many stars are in the Milky Way?

"It's a surprisingly difficult question to answer. You can't just sit around and count stars, generally, in a galaxy," said David Kornreich, an assistant professor at Ithaca College in New York. He was the founder of the "Ask An Astronomer" service at Cornell University.

Even in the Andromeda Galaxy — which is bright, large and relatively close by Earth, at 2.3 million light-years away — only the largest stars and a few variable stars (notably Cepheid variables) are bright enough to shine in telescopes from that distance. A sun-size star would be too difficult for us to see. So astronomers estimate, using some of the techniques below.

The Milky Way's structure

From observations, astronomers know that the Milky Way is a barred spiral galaxy that is about 100,000 light-years across. A view outside the galaxy would reveal a central bulge surrounded by four arms, two major and two minor. The Milky Way's major arms are known as Perseus and Sagittarius. The sun is located in one of two minor spurs, which is called the Orion Arm.

The galaxy also has a huge hot-gas halo around it that is several hundreds of thousands of light-years in diameter. Astronomers estimate that the halo is just as massive as all of the stars in the Milky Way. Many of the Milky Way's stars, however, are tough to view. That is because the center of the galaxy has a galactic bulge filled with stars, gas and dust — as well as a supermassive black hole. This area is so thick with material that even powerful telescopes cannot see through it. Astronomers aren't sure when and how the bulge formed; some suggest that the Milky Way's early history was changed when the galaxy collided with another one.

Astronomers used to think that all of the stars in the universe were located inside of the Milky Way, but that changed in the 1920s. Astronomer Edwin Hubble used a star called a Cepheid variable to measure distances in the sky. From there, astronomers learned that there were whole galaxies in the universe separate from the Milky Way.

Massive investigation

The primary way astronomers estimate stars in a galaxy is by determining the galaxy's mass. The mass is estimated by looking at how the galaxy rotates, as well as its spectrum using spectroscopy.

All galaxies are moving away from each other, and their light is shifted to the red end of the spectrum because this stretches out the light's wavelengths. This is called "redshift." In a rotating galaxy, however, there will be a portion that is more "blueshifted" because that portion is slightly moving toward Earth. Astronomers must also know what the inclination or orientation of the galaxy is before making an estimate, which is sometimes simply an "educated guess," Kornreich said.

A technique called "long-slit spectroscopy" is best for performing this type of work. Here, an elongated object such as a galaxy is viewed through an elongated slit, and the light is refracted using a device such as a prism. This breaks out the colors of the stars into the colors of the rainbow.

Some of those colors will be missing, displaying the same "patterns" of missing portions as certain elements of the periodic table. This lets astronomers figure out what elements are in the stars. Each type of star has a unique chemical fingerprint that would show up in telescopes. (This is the basis of the OBAFGKM sequence astronomers use to distinguish between types of stars.)

Any kind of telescope can do this sort of spectroscopy work. Kornreich often uses the 200-inch telescope at the Palomar Observatory at the California Institute of Technology, but he added that almost any telescope of sufficient size would be adequate.

The ideal would be using a telescope in orbit because scattering occurs in Earth's atmosphere from light pollution and also from natural events — even something as simple as a sunset. The Hubble Space Telescope is one observatory known for this sort of work, Kornreich added. A successor observatory called the James Webb Space Telescope is expected to launch in 2020. The challenge, however, is that Hubble is a telescope in high demand – and the same is expected of Webb after its launch. So the observatories can't spend all of their time estimating galaxy mass.

How much of the mass is stars?

Between different galaxies of the same mass, there could be variances as to the types of stars and the overall mass. Kornreich cautioned this would be very hard to speak about generally, but said that one difference could be looking at elliptical galaxies vs. spiral galaxies such as our own, the Milky Way. Elliptical galaxies tend to have more K- and M-type red dwarf stars than spiral galaxies. Because elliptical galaxies are older, they will have less gas because that was blown away during their evolution.

Once a galaxy's mass is determined, the other tricky thing is figuring out how much of that mass is made of stars. Most of the mass will be made up of dark matter, a type of matter that emits no light but which is believed to make up most of the mass of the universe.

"You have to model the galaxy and see if you can understand what the percentage of that mass of stars is," Kornreich said. "In a typical galaxy, if you measure its mass by looking at the rotation curve, about 90 percent of that is dark matter."

With much of the remaining "stuff" in the galaxy made up of diffuse gas and dust, Kornreich estimated that about 3 percent of the galaxy's mass will be made up of stars, but that could vary. Further, the size of the stars itself can greatly vary from something that is the size of our sun, to something dozens of times smaller or bigger.The number of stars is approximately …

So is there any way to figure out how many stars are for sure? In the end, it comes down to an estimate. In one calculation, the Milky Way has a mass of about 100 billion solar masses, so it is easiest to translate that to 100 billion stars. This accounts for the stars that would be bigger or smaller than our sun, and averages them out. However, the mass is tough to calculate — other estimates have said the galaxy has a mass of between 400 billion and 700 billion solar masses.

The European Space Agency's Gaia mission is mapping the locations of approximately 1 billion stars in the Milky Way. ESA says Gaia will map 1 percent of the stellar content in the Milky Way, which puts the estimate of the total stars in our galaxy at 100 billion. Gaia's goal is to make the best-ever three-dimensional map of the Milky Way.

The caveat, Kornreich said, is that these numbers are approximations. More advanced models can make the approximation more accurate, but it would be very difficult to count the stars one by one and tell you for sure how many are in the galaxy.