How much actual matter is in a Earth-sized sphere of "empty" outer space?

Sometimes in discussions about space ships traveling at the speed of light, some people will bring up concerns about hitting matter in space. Other people will say that outer space is mostly empty and that the ship won’t hit that much matter. So outer space is very empty, but I find it hard to understand how empty it is.

If you took a spherical region of outer space the size of the Earth, how much matter would there be in it? If you compressed that matter down, how much volume would it occupy?

I’ll give it a shot:

Average density of intersteller space is about 1 atom per cubic centimeter.

75% is Hydrogen
25% is Helium

Earth volume in cubic centimeters is 1.08E+27 cubic centimeters.

You would have about 8.10E+26 atoms of Hydrogen and 2.70E+26 atoms of Helium.

Using Avogadro’s number, it means about 1,345 moles of Hydrogen and 448 moles of Helium. This means:

1,345 g Hydrogen
1,795 g Helium

Total mass: 3,140 g in an Earth sized volume in intersteller space.

The problem isn’t so much how much matter is in the path of a ship, but how much energy is released when that particle releases hits. At any appreciable fraction of c the energy released is impressive.

It’s mostly hydrogen by weight, not just by number of atoms. It’ll still be of the order of a few kilograms, though.

And the problem isn’t the thin uniform distribution of hydrogen and helium atoms: Your ship can probably handle those, and might even be depending on them as a fuel source. The problem is the specks of solid material: They’re much less common, and would make up much less total mass, but each one would pack a wallop.

Going by weight, then it would be about 2.2 Kg.