Cooked pasta of any shape keeps three to four days in the refrigerator, while fresh and filled pasta run shorter. What ends most containers is not spoilage at all. Starch retrogradation turns day three penne chalky while it remains perfectly wholesome, so this is usually a texture deadline.
Dry, fresh and filled pasta run on three clocks
Dry boxed pasta is flour and water with almost no moisture left, which is why an unopened box sits in a pantry for a very long time. Cook it and you add water back, which restarts the clock entirely. From that point it is a cooked starch like any other.
Fresh refrigerated pasta is a different product. It carries egg and a lot of moisture before it ever meets a pot, so both the sealed package and the cooked leftovers move faster. Filled shapes such as ravioli and tortellini move faster still, because the stuffing is usually cheese, meat or seafood, and that filling, not the dough, sets the limit.

Storage windows for every form of pasta
| Form | Refrigerated | Frozen | What runs out first |
|---|---|---|---|
| Dry pasta, unopened box | Pantry, see printed date | Not needed | Nothing, it is dry |
| Fresh pasta, sealed package | Printed date | Months for quality | Moisture and egg |
| Fresh pasta, opened | A day or two | Months for quality | Surface moisture |
| Cooked plain shapes | Three to four days | Two to three months | Texture, then quality |
| Cooked filled pasta | Shorter, judge the filling | Months for quality | The stuffing |
| Dressed pasta salad | Judge the dressing and add ins | Not recommended | Raw mix ins |
Treat these as the commonly circulated refrigerated guidance rather than a rule carved anywhere. FoodSafety.gov and the USDA publish the current numbers for cooked leftovers, and they are worth checking directly for a dish you are unsure about.
Your nose and your fingers settle it
Open the container and smell it before anything else. Cooked pasta should smell of almost nothing, or faintly of its sauce. A sour, yeasty or fermented note means it is done, and so does any sharpness that makes you pull back.
Then touch it. A slippery or ropy film on the strands is a clear stop. So is any visible fuzz, any pink or gray patch, and any bloom of color in the sauce. Bubbles in the container or a lid that resists coming off are both signs of gas being produced, which is another reason to stop.
Packing choices that decide day four
Most pasta gets thrown out because it was stored badly, not because four days is short. A wide shallow container cools far faster than a deep one, and fast cooling is the part that matters most. Give the steam somewhere to escape before you seal the lid, or condensation drips back onto the noodles all night.
Store plain noodles with a light coating of oil so they do not fuse into one block, and keep sauce separate when you can, because separated pasta reheats evenly and sauced pasta reheats into a paste. Label the container with the date it was cooked rather than the date you remember cooking it.
To reheat, add liquid and be patient. A few tablespoons of water, broth or extra sauce plus a covered dish and gentle heat will reverse most of the stiffening, since retrogradation is largely undone by warmth and moisture.