I want to use the fat for cooking which I collect off the top of bone broth or stewing meats. how long will the collected fat last in the fridge in an airtight container?
I regularly collect fat every time I roast a duck or goose. I pour it into ice cube trays and once the cubes are frozen, I just pop them into a freezer bag. The fat will be fine seemingly indefinitely in the freezer. Every time I make soup, I just throw a fat cube into the pot to saute the vegetables in. I have also done this with lard. Once I just kept a jar of duck fat in the fridge and it seemed fine for several months. It did reach a point where it was obviously musty smelling, so I think you can also trust your nose.
Just be weary for stuff growing on the surface and use your nose.
I've found it doesn't have the shelf life I have come to expect from rendered tallow.
I think this is mainly because the fat at the top of the broth is in contact with water (whereas with my suet the last part of the extraction has all the water boiled off). Just because the fat looks pure doesn't mean it is - it actually has a fairly concentration of water due to equilibrium solubility. I've had broth fat stored in the fridge covered with plastic develop mold within two weeks. I can be pretty careless though as I have a regular supply of the stuff coming from my slow cooker.