The common housefly (Musca domestica) lives a surprisingly short yet fast-paced life. Most people ask questions like “How long does a housefly live?”, “How long does a housefly live in a house?”, or “How long does a housefly live without food?” because flies seem to appear suddenly and vanish just as quickly. Their lifespan depends heavily on temperature, food availability, and whether they live indoors or outdoors. Understanding their lifecycle helps explain why they seem both persistent and temporary.
What Is a Common Housefly?
Houseflies are one of the most widespread insects on Earth, thriving wherever humans live. They feed on decaying organic matter, sugary liquids, animal waste, and leftover food—making homes an ideal environment. Their rapid reproduction and short generation time mean populations can grow quickly, especially in warm, humid environments.
Lifecycle of a Housefly (Complete Metamorphosis)

Houseflies undergo a complete four-stage lifecycle: egg → larva → pupa → adult. A full cycle can take 7–14 days, depending on temperature and food sources. Because the cycle is so fast, even a single female fly can lead to hundreds of flies in just a few weeks.
Egg Stage
Female houseflies lay their eggs in moist, organic material such as garbage, manure, compost, or leftover food. A single female can lay 500–600 eggs over her lifetime, usually in clusters of 75–150 at a time.
Key points about housefly eggs:
- Hatch within 12–24 hours
- Require moisture and warmth
- Typically laid on decaying matter
- White, rice-grain-like appearance
This rapid hatching explains why food left uncovered can attract maggots in less than a day.
Larval (Maggot) Stage
After hatching, larvae—commonly known as maggots—immediately begin feeding. Their only purpose at this stage is to eat and grow.
Larval stage highlights:
- Consists of three instars (growth stages)
- Lasts 3–5 days depending on temperature
- Maggots prefer warm, dark, moist environments
- Extremely fast growth rate (they can triple in size)
Houseflies grow fastest between 30–35°C (86–95°F). Cooler conditions slow down development significantly.
Pupal Stage
When fully grown, the maggot transforms into a pupa. The outer skin hardens into a protective brown shell called a puparium.
Pupal stage facts:
- Lasts 3–6 days
- The maggot completely reorganizes into an adult fly
- Color changes from yellow → red → dark brown
Once the adult is fully formed, it pushes open the pupal case and emerges as a completely functional fly.
Adult Stage
Adult houseflies emerge with soft bodies and pale wings. Within a few hours, they harden and become capable of flying.
Adult stage essentials:
- Reach sexual maturity in 24–48 hours
- Begin laying eggs shortly after mating
- Continuously reproduce throughout life
Because adults mature quickly and reproduce constantly, even a few flies indoors can lead to a noticeable population.
Average Housefly Lifespan

The average lifespan of a housefly is 15–30 days. However, this range changes depending on the environment. Outdoor flies face predators, weather fluctuations, and limited food. Indoor flies can live longer because they have steady warmth and easy access to food.
Most scientific sources list the typical housefly lifespan at 21–25 days, which is why many people believe a housefly lives “22 days.” This number represents a common average across laboratory and indoor conditions.
Female Housefly Lifespan
Female houseflies often live slightly longer than males, primarily because they require more time and energy to complete their reproductive activities. A well-fed female can survive 25–30 days, sometimes a little more in warm, stable indoor environments. During this period, she lays hundreds of eggs in multiple batches, ensuring rapid population growth. Nutrition, moisture, and temperature strongly influence how long she survives and how many eggs she can produce.
How Long Houseflies Live Indoors

Indoor environments are ideal for houseflies because they provide warmth, consistent temperatures, and constant access to food and moisture. As a result, many flies live closer to the upper end of their lifespan range when living inside a home. Indoors, a typical housefly can survive for 20–30 days, depending on food availability and living conditions. Without natural predators or harsh weather, indoor flies tend to remain active longer and reproduce more frequently.
Homes with open food, garbage, or spills provide abundant nutrition. Kitchens, trash bins, and warm humid spaces are particularly inviting. When these conditions remain stable, several generations can develop in the same household within a month, especially during warmer seasons.
How Long Houseflies Survive Without Food or Water
Like most insects, houseflies need moisture and nutrients to stay alive. Their survival without food depends heavily on environmental conditions, particularly humidity and temperature.
Without Food
A housefly can usually survive 2–4 days without eating. Warmer temperatures speed up metabolism, shortening survival time. Cooler, humid conditions allow slightly longer endurance.
Without Water
Moisture is even more essential than food. Without access to water, flies may die within 48 hours. Most of their hydration comes from the liquids they consume—such as spills, fruits, or damp surfaces.
Without Both Food and Water
When deprived of both, survival rarely exceeds 48–72 hours. Their high metabolic rate and small body size cause them to dehydrate quickly.
Environmental Factors That Affect Lifespan

Several environmental variables significantly influence how long a housefly lives:
- Temperature: Warm conditions accelerate development and aging; cooler temperatures slow metabolism and extend life.
- Humidity: Stable moisture levels improve survival and reproduction.
- Food Availability: Access to sugars, proteins, and organic waste sustains adults longer.
- Predators: Spiders, birds, lizards, and other insects reduce outdoor survival.
- Human Activity: Cleaning, traps, repellents, and swatting impact indoor survival.
- Season: Flies live longer in spring and summer; cold weather dramatically reduces lifespan outdoors.
A combination of these factors determines whether a fly survives only a few days or completes its full natural lifespan.
Myth vs. Reality: The “22-Day Lifespan”
Many charts and educational sources list the housefly lifespan as 22 days, leading to a widely repeated belief that all houseflies live exactly that long. In reality, this number is simply an averaged estimate based on ideal laboratory conditions. In controlled environments—consistent temperature, abundant food, and no predators—flies often do live around 21–23 days.
However, real-world lifespans vary much more. Outdoors, many perish within a week. Indoors, many exceed the 22-day estimate, especially females. The actual lifespan always depends on the conditions the fly experiences.
How to Reduce Housefly Survival Indoors

Maintaining a clean environment is the most effective way to reduce how long flies stay active in a home. Simple daily habits can break their life cycle and remove essential resources.
Effective methods include:
- Keeping food covered and cleaning spills immediately
- Taking out trash regularly
- Rinsing recyclables before disposal
- Sealing cracks and entry points
- Using traps or screens to limit access
- Maintaining dry surfaces to eliminate moisture sources
When food and water are limited, houseflies naturally die off quickly.
FAQs
How long does an average housefly live?
An average housefly lives for about 15–30 days, depending on temperature, food availability, and environmental conditions. Indoors, they often survive longer because they enjoy steady warmth and easy access to food. Outdoors, predators and weather fluctuations usually shorten their lifespan significantly.
Do houseflies live longer indoors?
Yes, they typically live longer indoors. Warm temperatures, constant food sources, and protection from predators allow indoor flies to reach the upper end of their natural lifespan. While outdoor flies may die within a week, those inside a home can often live for 20–30 days.
How long can a housefly survive without food?
A housefly can survive only 2–4 days without food, depending on humidity and temperature. Their high metabolic rate means they need frequent nourishment. In warmer conditions, they burn energy faster and die sooner, while cooler, humid environments allow them to endure slightly longer.
How long can a housefly live without water?
Houseflies rely heavily on moisture to survive. Without water, they usually die within 48 hours. Most hydration comes from the foods and liquids they consume, so environments with limited moisture cause them to dehydrate rapidly, significantly reducing their survival time.
Do female houseflies live longer than males?
Female houseflies often live slightly longer because they require extra energy for reproduction and egg-laying. With sufficient food and stable indoor conditions, females may live 25–30 days or more, while males typically fall on the shorter end of the lifespan range.