Why do Eggs float?
If the eggs are carefully placed in the fresh cold water based on the extent of its freshness, it attains its position inside water. If the egg sinks completely and remains in the bottom, then it is said to be fresh. If the egg is standing on the bottom in an angle, then also it will be fresh and good to consume. If the egg stands with its pointed end attached to the bottom, even then the egg is not stale and is ready to be eaten. But, this stage of egg can be utilized for baking and making of well cooked eggs. If the egg floats, it means the egg in the question is stale and can be thrown away as it is not useful.
If the egg floats in water, it means that it is an old one. As the egg ages it is found to get dehydrated. The egg shell is found to be having pores. The semi porous nature of the egg shell makes the air and bacteria to enter into the egg. The egg will be filled with gases as it becomes old. The size of the air bubble that naturally occurs inside the egg is supposed to increase as it ages. The presence of gases inside the egg makes it more buoyant and stands in water straight from the bottom towards the top surface. This happens when it is still fresh. But, if the egg is floating, it means that egg has decomposed.
If the weight of the egg is less than the weight of the water displaced by the volume of the egg then the egg floats. If gases fill the egg, the weight of the egg does not vary or become less. When the egg is spoiled or decomposed then its weight reduces. The heavy water vapor and decomposed gases will leave the egg and the lighter ambient air fills the egg through the porous shell. Now, the egg becomes lighter and floats in water.
Egg also floats in salt water as the buoyancy of egg in salt water will be less than its weight. This happens as the salt added to the water enhances its density.