Background: Atrial fibrillation (AF) is known to worsen over time. Beat-to-beat P-wave variability is used to evaluate the risk of developing AF, but it has not been used to monitor arrhythmia progression in a comprehensive model. The aim of this study is to create a method to measure beat-to-beat P-wave variability to evaluate AF types. Methods: 5-minute ECGs of 159 AF patients (119 with paroxysmal AF, 40 with persistent AF) were recorded. The first three principal components (PCs) of the ECG signal were added to the analysis. A clustering procedure was used to select the P-waves: the principal component analysis (PCA) of ECG leads was applied on the segments before the R peaks (P-window); the density-based spatial clustering (DB-SCAN) was applied on the coefficients of the first 2 PCA components of each P-window to detect false and noisy P-waves that were discarded from analysis. The temporal beat-to-beat P-wave variability was assessed through the Euclidean Distance and the Similarity Index, computed as the cosine of the angle between two consecutive P-waves. The spatial P-wave similarity was measured as the percentage of variance explained by the first 3 PCA components. A binomial logistic regression model was built, with AF type as dependent variable. To assess variability due exclusively to the P-waves, we considered as confounding factors other sources of ECG-variability, such as the noise level, the variability of the RR series and of the heart axis. Results: Both temporal (e.g. 0.94±0.12 for paroxysmal AF and 0.85±0.28 for persistent AF in lead I, p=0.001) and spatial (97.92±1.50% for paroxysmal AF vs 97.56±1.78% for persistent AF, p=0.002) P-wave similarity were significantly higher in paroxysmal AF than in persistent AF. Conclusions: Beat-to-beat P-wave variability is a promising tool to evaluate AF types.