How long will it take for a filling a cavity to fall out?

Varies widely. No set time frame can be given. In general, dental restorations last about 10 years. Depending on the size of the filling, its location, and how well you brush and take care of it, it can last a whole lot longer. In some instances, it can have problems much sooner.