How many planets can fit into the habitable zone around a star? A group of scientists saw this question posed by a non-scientist on Reddit and decided to answer it.

The answer they came up with is five rocky planets the mass of Earth around a small, dim star (called a red dwarf).

In the past 20 years or so, astronomers have confirmed the existence of nearly 3,400 planets outside Earth's solar system, many of which NASA's Kepler space telescope discovered. Many of these exoplanets lie in the habitable zone of their stars — the area warm enough for worlds to have liquid water on their surfaces. On Earth, water is a requirement for life; living organisms are found virtually everywhere there is liquid water, even miles underground. [Exoplanets: Worlds Beyond Our Solar System]

The new work looking into how many exoplanets might fit into a star's habitable zone began with Christa Van Laerhoven's role as a panelist on AskScience, an online forum hosted by the message-board-driven website Reddit, where scientists can answer questions posed by non-scientists.

"One day somebody asked, 'How many planets can you fit into a habitable zone, anyhow?'" said Van Laerhoven, study lead author and a planetary scientist at the Canadian Institute for Theoretical Astrophysics in Toronto.

After examining prior work, Van Laerhoven found there was not yet a definitive answer to this question.

"The Kepler mission has shown us that planetary systems can be much more tightly packed than our solar system is," Van Laerhoven told Space.com. "It is thus worth asking what the limit is for how tightly planets can be packed together."

Van Laerhoven and her colleagues focused on K and M type stars, also known as red dwarfs. These stars are small, cold and about one-fifth the sun's mass and up to 50 times fainter. Red dwarfs constitute up to 70 percent of the stars in the universe, and NASA's Kepler spacecraft has discovered that at least half of these stars host rocky planets that are one-half to four times the mass of Earth.

Red dwarf planets are potentially key places to search for life, not just because there are so many of them, but also because of their incredible longevity. Unlike the sun, which will die in a few billion years, red dwarfs will take trillions of years to burn through their fuel, significantly longer than the age of the universe, which is about 13.8 billion years old. This longevity may give life ample time to develop on the planets that orbit these stars.

The habitable zones of red dwarfs fall close to these stars because of how cool they are — often closer than the distance at which Mercury orbits the sun. This closeness makes red dwarfs appealing to scientists hunting for habitable worlds, since planets in those habitable zones will cross in front of their star more often, making them easier to detect than planets that orbit farther away.

For the new research, the scientists carried out computer simulations involving a red dwarf about half the sun's mass, surrounded by a number of rocky planets with the same mass as Earth revolving around the star in circular orbits. These simulations each lasted up to 10 billion orbits of the innermost planet in each system. A planet at the inner edge of such a red dwarf's habitable zone would take only about one-fifth of an Earth-year to complete an orbit, Van Laerhoven said.

The gravitational influence that the rocky planets exerted on each other limited how many planets could cram into a region around the star; the scientists calculated that, at most, a red dwarf could host less than a half-dozen Earth-size planets in its habitable zone.

"Dear science-fiction authors ― you can fit up to five planets into the habitable zone of a star," Van Laerhoven said.

If people were living on the innermost world of such a system, its nearest neighbor it would look "about 6.7 times smaller than the moon appears to us," even during the two planets' closest approach, Van Laerhoven said.

It remains uncertain whether such a tightly packed system might ever form in nature.

"There may well not be enough mass in planet-forming disks to produce systems that are so ultra-tightly packed," Van Laerhoven said. "The Kepler mission has shown us that very tightly packed systems exist, but they don't quite reach the level of packing required to stuff five Earths in the habitable zone. That said, finding small planets is challenging and I don't think we've yet seen all the kinds of planetary systems that nature can create."

Future research can see what effects tilting and elongating the orbits of these planets might have on the stability of these systems, Van Laerhoven said.

The scientists detailed their findings Oct. 19 at the American Astronomical Society Division for Planetary Sciences and European Planetary Science Congress in Pasadena, California.

Follow Charles Q. Choi on Twitter @cqchoi. Follow us @Spacedotcom, Facebookand Google+. Original article on Space.com.