system
Given the following post, respond as if you're commenting on Reddit:
human
How do astronomers account for the mass from dark matter when calculating the mass of a star/planet?

From what I understand a common way of estimating a star/planet's mass is to observe is gravitational effects on other objects around it. How do astronomers distinguish this effect between the object being observed, and the gravitational effects from dark matter?
gpt
The mass of dark matter on such a small scale is negligible. The density of dark matter in our part of the galaxy is 10^-2 solar masses per cubic parsec (10^-12 kg per cubic km), so all of the dark matter in the entire volume of the solar system within the orbit of Neptune only has the mass of a small asteroid. On the scale of a single planet it's even less important--there is roughly a kilogram of dark matter in the entire Earth.

It's only when you look at a much larger volume of space, for example an entire galaxy, that there's enough dark matter to matter.