Cranberry sauce can last up to 14 days in the refrigerator but it's best to eat it at least within a week for the best freshness and taste of the cranberry sauce.
If you refrigerate cranberry sauce store it in a sealed container to prevent other food odors from getting into the cranberry sauce.
If you have unopened cans of cranberry sauce then they can remain in the pantry or shelf for 8 to 10 years before they go bad.
As long as the can is in good shape with no rust then the cranberry sauce will last a long time.
Homemade cranberry sauce however won't last as long unless you're able to can it but it's best to eat the cranberry sauce within a few weeks and by fresh or make some more fresh cranberry sauce.