# How to calculate metallicity of a star that is made of iron of 20kg and Hydrogen 1000 kg?

I want to know how to calculate star metallicity using only masses of metal and hydrogen of the star. I am attaching my working so far. I am not sure how to exactly calculate the log10(Fe/H) based on masses alone. Also, please note I am not sure how the log10(Fe/H) of the Sun is obtained either. I just found the value online. So, explaining one will help explain the other, I guess.

Thanks!

• You would greatly increase the readability and accessability of your question, if you typed the formula as text using MathJax (kinda LaTeX format). Jun 13 at 13:35

You cannot calculate the solar ration of $$\mathrm{Fe/H}$$ nor can you calculate the logarithmic ratio of iron to hydrogen for a star - both are entities you have to measure. So in order to calculate the relative metallicity of a star $$[Fe/H]_\star$$ in terms of solar metallicity $$\log_{10}{\mathrm{Fe_0/H_0}}$$ you also have to know the absolute metallicity of the star from the number ratio of its constituent atoms $$\log_{10}{\mathrm{Fe_*/H_*}}$$.