The computer program LFREE was written to do loss-free counting with a digital spectrometer. It runs in parallel with the normal data acquisition software and corrects the counting losses once per second without interrupting data acquisition. The spectrometer's live time clock is used to measure the live time fraction. Tests showed that losses are accurately corrected at variable count rates which cause dead times as high as 80%. For half-lives of the order of 10 seconds, the accuracy is limited by the response of the live time clock to very rapidly changing count rates.