Archimedes' principle states that the buoyant force on an object is equal in magnitude to the weight of the displaced liquid.
A corollary is that for a freely floating object on the surface, the buoyant force must exactly cancel the weight of the object. Since Archimedes' principle states that the buoyant force is equal in magnitude to the weight of the displaced liquid, the weight of the displaced liquid must be equal to the weight of the entire object or the object will not be floating.
Note that freely floating in not the same as partially immersed. For a partially immersed object, there may be other forces at work as well in addition to gravity and the buoyant force. In that situation, those forces must also be taken into account.