More than 99% of the mass of the visible universe is made up of protons and neutrons. Both particles are much heavier than their quark and gluon constituents, and the Standard Model of particle physics should explain this difference. A full ab initio calculation of these masses is carried out. To that end one uses the basic equations of the strong interactions on the lattice. Even the tiny mass difference between the neutrons and protons can be determined. The results completely agree with experimental observations. The generation of this hadronic mass is related to a transition in the early universe, which is also discussed.