Cheesecake is a baked custard in a cake costume, and custard is the shortest lived thing in your refrigerator. Eggs and soft cheese give it high moisture and a fairly neutral acidity, the opposite of what makes buttercream durable. Plan on a few days, not the week you would give a frosted layer cake.
The custard is the limiting factor
Take the two ingredients that define it. Eggs contribute protein and a lot of water, and they set into a gel rather than drying out. Cream cheese brings moisture along with its fat. Neither one ties up water the way a heavy sugar syrup or a dense buttercream does, so there is plenty of available water in the crumb for microbes to work with.
Acidity is the other half. Preserved foods generally lean acidic, and while cheesecake tastes tangy, it is not acidic enough to do much preserving. That combination, wet and near neutral, is why the same fridge that keeps a pound cake fine for a week gives you a much tighter window here.

Toppings move the number in both directions
A sour cream layer spread over the top after baking behaves like the filling underneath and does not extend anything. Fresh fruit and a loose compote shorten it, because fruit releases water as it sits and brings its own surface microbes to the party. Chocolate ganache and thick caramel go the other way, since both are dense with sugar and fat and form a partial seal over the surface.
Store bought cheesecake sold unopened and refrigerated often carries a longer date than a homemade one deserves. That is formulation and packaging, not magic, and once you open it the clock resets to roughly the homemade window.
Storage windows by style
| Style | Refrigerated, covered | Frozen |
|---|---|---|
| Baked, plain or with sour cream top | Three to five days | One to two months |
| Baked, with fresh fruit topping | Two to three days | Freeze plain, top after thawing |
| No bake, gelatin or starch set | Two to three days | About a month, texture softens |
| Store bought, unopened | Use the package date | Check the package first |
| Individual slices, wrapped | Same as the whole cake | One to two months, easiest to thaw |
Those are quality ranges people cook by, not a safety verdict. For the official numbers, the FoodSafety.gov cold food storage chart is the reference to check, and it covers the room temperature limits too.
Freezing works, thawing is where it goes wrong
Cheesecake freezes better than most desserts because the fat content protects the texture through the ice crystal stage. Chill it fully first, then freeze it uncovered until the surface firms up so plastic wrap will not stick and peel the top off. Wrap tightly, then add a layer of foil or a freezer bag.
Thaw it in the refrigerator overnight rather than on the counter. Counter thawing warms the outer inch into the range where you would rather it not sit, and it drives condensation onto the surface, which turns the top slick and waterlogged. Slices thaw in a couple of hours and let you take out only what you plan to eat, which beats cycling a whole cake in and out.