The slab formation energy Ef,slab, which describes the change in slab energy from the initial singlecomponent slab (Eslab,ini) upon exchange of ni atoms of species i to / from a reservoir of that respective species to the final bi-or multicomponent slab, is derived from the energy difference of the final slab (Eslab,fin) on the one hand and of the initial slab (Eslab,in), the numbers ni and the bulk energies Ei of the exchanged species atoms on the other hand, 𝐸 𝑓,𝑠𝑙𝑎𝑏 =