A system for calculating a variability value that is indicative of AF by obtaining a signal sequence of a plurality of RR intervals by monitoring electrical activity of a patients heart. Each RR interval is converted into an instantaneous heart rate value and sorted into ascending order. The difference between each successive heart rate is calculated, discarding the two largest differences. The variability value is calculated by adding the retained differences.