A system for processing ECG to detect atrial fibrillation includes three software modules. A beat module is executable on a processor to receive a time series of ECG data, identify heart beats, and determine a beat AFIB value based on a timing of each identified heart beat. The beat AFIB value represents a presence or absence of AFIB based on variability in the timing of each identified heart beat. A segment module is executable to receive the time series of ECG data, divide the time series of ECG data into two or more time segments, and determine a segment AFIB value for each time segment. The segment AFIB value indicates a presence or absence of AFIB in the time segment based on whether any of a set of rhythms are identified. The AFIB detection module is executable to determine an AFIB identification value for each time segment based on the beat AFIB value during that time segment and the segment AFIB value for that time segment.