Tomatoes usually cannot last any longer than a week to a week and a half inside a refrigerator, though they tend to lose a lot of their flavor when they are kept in for more than two or three days.
After seven to ten days inside a refrigerator, tomatoes typically start to rot and take on a mushy texture which renders them inedible for most people.
It is highly recommended that you eat the tomatoes you bring home from the grocery store as soon as possible and only store them in the fridge for up to a few days before eating them.