A method and a system for detection of an arrhythmia, the method comprising determining a number of heart beat intervals determining an instantaneous heart rate for each of the heart beat intervals determining the variability of the instantaneous heart rates compared to a mean of the number of instantaneous heart rates determining a non-linear value that represents the variability of the instantaneous heart rates and detecting the arrhythmia by comparing the non-linear value with a predetermined threshold.