ABSTRACT: Infection of more than one virus in a host, coinfection, is common across taxa and environments. Viral coinfection can enable genetic exchange, alter the dynamics of infections, and change the course of viral evolution. Yet, a systematic test of the factors explaining variation in viral coinfection across different taxa and environments awaits completion. Here I employ three microbial data sets of virus-host interactions covering cross-infectivity, culture coinfection, and single-cell coinfection (total: 6,564 microbial hosts, 13,103 viruses) to provide a broad, comprehensive picture of the ecological and biological factors shaping viral coinfection. I found evidence that ecology and virus-virus interactions are recurrent factors shaping coinfection patterns. Host ecology was a consistent and strong predictor of coinfection across all three data sets: cross-infectivity, culture coinfection, and single-cell coinfection. Host phylogeny or taxonomy was a less consistent predictor, being weak or absent in the cross-infectivity and single-cell coinfection models, yet it was the strongest predictor in the culture coinfection model. Virus-virus interactions strongly affected coinfection. In the largest test of superinfection exclusion to date, prophage sequences reduced culture coinfection by other prophages, with a weaker effect on extrachromosomal virus coinfection. At the single-cell level, prophage sequences eliminated coinfection. Virus-virus interactions also increased culture coinfection with ssDNA-dsDNA coinfections?>2× more likely than ssDNA-only coinfections. The presence of CRISPR spacers was associated with a ?50% reduction in single-cell coinfection in a marine bacteria, despite the absence of exact spacer matches in any active infection. Collectively, these results suggest the environment bacteria inhabit and the interactions among surrounding viruses are two factors consistently shaping viral coinfection patterns. These findings highlight the role of virus-virus interactions in coinfection with implications for phage therapy, microbiome dynamics, and viral infection treatments.