How is the value of `energy per atom` and `formation_energy_per_atom` obtained in MP?

I had a problem calculating the formation energy per atom according to the formula in this link, and the result I got was significantly different from that given by the database. I calculate it as follows:
I use VASP to calculate the energy of the most stable element of each species, and then divide energy without entropy in OUTCAR by the number of atoms to get energy per atom. I treat this value as μ in the formula.

I wonder what’s wrong with my calculation and whether the ‘energy per atom’ calculated by my method is μ in the formula. In fact, the ‘energy per atom’ I get is also very different from the energy per atom in the database.

PLS help, Thanks!

cheers