The fruit fly, known scientifically as Drosophila melanogaster, is a ubiquitous insect often found near ripening or decaying produce. While known to many as a common household pest, it is also one of the most studied organisms in biological research due to its simple genetics and rapid life cycle. The answer to how long a fruit fly lives is highly variable and depends entirely on its environment. Under ideal conditions, the adult fruit fly lifespan is typically measured in weeks, averaging between 40 and 50 days from the moment it emerges.
The Complete Life Cycle Duration
The total duration of a fruit fly’s life begins with the egg and encompasses four distinct stages before the adult fly emerges. Under optimal laboratory conditions, such as a steady temperature of around 77°F (25°C), the entire process from egg to sexually mature adult takes approximately 8 to 12 days. The female fly deposits tiny, rice-shaped eggs directly onto fermenting organic matter, which typically hatch within 12 to 24 hours.
The resulting larva, often called a maggot, then enters the most active phase, feeding voraciously for about four to five days to fuel its growth. This larval stage includes three molts, where the organism sheds its exoskeleton before moving to a drier location to pupate. Inside the puparium, the insect undergoes metamorphosis for three to six days, transforming into its winged adult form.
Environmental Factors That Alter Lifespan
The time estimates for the life cycle are drastically altered by changes in external conditions, with temperature being the most significant variable. Because fruit flies are ectothermic, meaning their body temperature changes with their environment, cooler temperatures cause their metabolism to slow down considerably. For example, at a lower temperature of 64°F (18°C), the development time from egg to adult nearly doubles, extending to about 19 days.
This slower pace at cooler temperatures can significantly extend the adult lifespan, sometimes reaching over 130 days at temperatures around 59°F (15°C). Conversely, higher temperatures, such as 82°F (28°C), speed up development to its minimum of about seven days but accelerate the fly’s aging process, consequently shortening the adult phase. Poor nutrition also limits survival, as the flies require continuous access to high-quality, fermenting food sources.
The Impact of Rapid Reproduction
The biological consequence of a short life cycle is an extremely high capacity for population growth over a compressed timeframe. Female fruit flies become sexually mature and ready to reproduce within just two days of emerging as adults. This quick turnaround allows them to begin the next generation almost immediately.
A single female fly has the biological capacity to lay up to 100 eggs per day, with a total potential of 400 to 500 eggs during her adult lifetime. Since the time from egg to adult is roughly 10 days under typical room temperature, a population can experience exponential growth very quickly. This rapid succession of generations is why a small initial infestation can quickly become a major problem.

