As the egg ages, moisture evaporates through the shell allowing more air inside. This air will accumulate until there is enough to allow the egg to float. Once that happens you should not eat it. Your egg is no longer fresh enough to eat if it floats.
There is another way to determine how fresh an egg is. Simply hold the egg by the small end and tilt it a little, while holding the large end of the egg against a light.
In fresh eggs the air space will be no more than 1/8 of an inch deep. And the yolk will hardly be visible. If you twist the egg the yolk will not move very much when it is fresh.
In a old or stale egg, the air space will be larger and irregular in shape. And the yolk will be very visible and will move freely when you give the egg a twist.
If your airspace measures 1/8 inch or less it is considered AA quality. If it is up 3/16 of an inch it is A quality. An old egg's airspace is anything that measures more than 3/16 of an inch.
If you store an egg at room temperature it will age more in a single day than an egg stored 1 week in a refrigerator.