Do weight and volume decide if something floats?

I’ve read that weight and volume are key factors for floating or sinking. But how exactly do they work together?

Weight and volume combine to determine density. If the object’s density is less than water, it floats.

Tobin said:
Weight and volume combine to determine density. If the object’s density is less than water, it floats.

Exactly. It’s why a steel ship floats—it has air inside, lowering its overall density.

Archimedes’ principle explains this: if an object displaces more water weight than its own, it will float.