The code calculator works on a battery, which is estimated to last about seven years, depending on how much you use the device.