Metals and dust locked into planets I wonder what is the contribution of metals and dust locked into planets, with respect to the amount in the interstellar medium (ISM). In other words, when we measure the metallicity and the dust mass of a galaxy we are sensitive to metals and dust in the various phases of the ISM, and thus the observed value is a lower limit. Is the "correction" a second-order variation?
The amount of metals locked up in planets is completely negligible compared to that of the interstellar medium (ISM).

First, in a typical stellar system, the mass fraction of planets is less than 1%, and of this by far the most mass will be in gaseous planets, rather than rocky planets. For instance, in the Solar System, the mass fraction of all planets is 0.1%, while rocky planets comprises only a fraction of $6\times10^{-6}$.

Second, typically only a small fraction of the gas in a galaxy is locked up in stars. For small galaxies — which are the most abundant — as little as ~5% of the gas is in stars (e.g. Schombert et al. 2001), although for large galaxies like the Milky Way, which are more efficient at converting gas into stars, the ISM-to-stellar gas fraction can be of order unity (e.g. Morokuma-Matsui &amp; Baba 2015).

That is, the fraction of metals locked up in planets is of the order $10^{-5}\text{–}10^{-7}\!$, depending somewhat on the type of galaxy considered.

On the other hand, the fraction of metals locked up in dust is considerable, with typical values of roughly 1/3 of the metals in dust. Thus, if you want to know the metallicity of a galaxy by looking at emission or absorption lines from metals, you must either account for this factor (hoping that it's a universal factor which it may or may not be, see e.g. Zafar &amp; Watson 2013), or measure metals that tend not to deplete to dust grains, e.g. zinc or sulfur.