CMOS batteries last between 2 and 10 years before they go bad and need replaced.
A CMOS battery will typically last the life of the computer and most people will replace their computer with a new one before they need to replace the CMOS battery.
The CMOS battery is always being charged when the Laptop or desktop is plugged in so it does not really just go dead.
By the time a CMOS battery goes bad in a computer it's usually time to replace the entire computer with a new one.
But you can buy new CMOS batteries and replace them easily.
Just make sure to unplug the computer before replacing the CMOS battery.
You can buy CMOS batteries online such as through Ebay for pretty cheap.