Magetic Media (Floppy Disks, Tapes, Unused Hard Drives) max 7 years actual is normally less but can be more.
Optical Media (assuming clean, cool environment) forever. That of course assumes there is still a device available 100s of years from now, or even 10 for that matter, that will read a CD.