Temperate bacterial viruses (phages) may enter a symbiosis with their host cell, forming a unit called a lysogen. Lysogens are prevalent across environments and may contribute to bacterial ecology. However, the factors determining phage and host fitness in lysogens are poorly understood. Here we analyze a large dataset of bacteria and phages to examine the costs and benefits of lysogeny.