Consider a composition such as $\ce{FeCo4Sb12}$.
The atomic weight for a mole of substance is usually simply calculated by looking up the atomic weights (g/mole) for each involved element and adding them together proportionally: $$M_{\ce{FeCo4Sb12}}=1\cdot M_{\ce{Fe}}+4\cdot M_{\ce{Co}}+12\cdot M_{\ce{Sb}}$$
But this compound is not a molecule. It is a representation of the amounts: there are 12 Sb and 4 Co for every Fe atom. I could also have written it as $\ce{Fe2Co8Sb24}$.
Same compound, but the calculation will give a different $M$.
The same issue comes for non-stoichiometric compounds, such as: $\ce{FeNb_{0.88}Hf_{0.12}}$. This just says that there are 88 Nb and 12 Hf for each Fe.
How should I understand the chemical formula when calculation atomic weights of crystalline or other non-molecular compounds as well as non-stoichiometric compounds?