Malaria has disappeared in some countries but not others, and an explanation for the pattern remains elusive. We show that the probability of eradication of malaria jumps sharply when average household size drops below four people. Part of the effect that is commonly attributed to income growth is likely to be due to declining household size. DDT usage plays only a weak role. Warmer temperatures are not associated with increased malaria prevalence. We propose that household size matters because malaria is transmitted indoors at night. We test this hypothesis by contrasting malaria with dengue fever, another mosquito-borne illness spread mainly by daytime outdoor contact.