Wearing face masks and maintaining social distance are familiar to many people around the world during the ongoing SARS-CoV-2 pandemic. Evidence suggests that these are effective ways to reduce the risk of SARS-CoV-2 infection. However, it is not clear how exactly the risk of infection is affected by wearing a mask during close personal encounters or by social distancing without a mask. Our results show that face masks significantly reduce the risk of SARS-CoV-2 infection compared to social distancing. We find a very low risk of infection when everyone wears a face mask, even if it doesn’t fit perfectly on the face.