We introduce the notion of a genus and its mass for vertex algebras. For lattice vertex algebras, their genera are the same as those of lattices, which plays an important role in the classification of lattices. We derive a formula relating the mass for vertex algebras to that for lattices, and then give a new characterization of some holomorphic vertex operator algebras.